1 / 21

Robotics

Robotics. Finish presentations Bluetooth Communications Brain storm project ideas Programming considerations Homework: Prepare to present proposal for building project. General comments on presentation. Good!

kamilia
Download Presentation

Robotics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Robotics Finish presentations Bluetooth Communications Brain storm project ideasProgramming considerationsHomework: Prepare to present proposal for building project

  2. General comments on presentation • Good! • and why not—you chose the topic and enthusiasm/interest is most important ingredient • Do always consider definitions & context: • opposing views • time line • compared to what • Follow directions! • 1 pager. Post proposal. Be on time. • There are times/situations when it is appropriate to break the rules. This wasn't one of them.

  3. General communications • Protocols (Bluetooth is a protocol) work in specific ways • handshaking, polling, timing • Messages may not get through • BT checks for messages of a certain data type • ….

  4. Good news • Bluetooth is the protocol for many gadgets, including cell phones. • Not all BT are the same • Some PC dongles work with NXT and some do not! • nxtasy.org and other on-line groups are very responsive • I posed a problem and get responses • One person said it couldn’t be done • Another (Brian Davis) produced an example that (according to him) works 80% of the time.

  5. General NXT-G • To get data wires into a switch clause, need to UNCLICK the flat view • Getting (sharing) other .rbt files is possible, though tricky… • Used Brian’s GetKey • NOTE: this was just to test his code. Your application need not use this.

  6. Master echo idea • Problem: how to communicate one slave to another slave • Solution: slave sends message to the master’s mailbox: 1, 2, 3. The master passes it on to connection 1, 2, or 3.

  7. Slave echo (test) Note: this program, running on all 3 slave robots, is just to test the concept… and along the way demonstrates several (new to us) NXT-G features • Random number generated to be sent • Concatenation of text • Operator presses 1 of 3 NXT buttons. This determines the target slave. • Recipient (of passed on message) makes beep and displays message received.

  8. More NXT-G • Makes use of Display mini-blocks • There also are motor and move mini-blocks. • Mini-blocks were/are more efficient versions of original blocks. • Should be present on the class Mindstorms. • If you have your own system, need to follow directions to download: program for adding blocks AND this particular set.

  9. masterecho.rbt

  10. slaveecho.rbt

  11. Caution • The parallel threads may be problematic. • NOTE: the busy-wait for message does cause action on both the master and the slaves according to information on-line…

  12. Programming Process • Make [small] testing programs • The slaveecho program may be bigger than an actual use of relaying messages • Use sounds and displays • Using the NXT buttons for events as opposed to bumper or other sensors may be good for debugging process

  13. Programming • Use MyBlocks: the one great idea of programming is the concept of subroutine. • Write comments in NXT-G files • Plan / Diagram • Especially events triggering multi-robot action • Memory is limited! • Remove unnecessary files. This may include sound files used in debugging. • Look for use of move vs motor vs mini-blocks. • Next class

  14. MyBlock • …programs must be stored in MyBlock folder on computer running Mindstorms • Global variables (variables shared by calling program and the MyBlock) must be defined in both • MyBlock can have 0, 1 or more inputs and 0, 1 or more outputs, but these must be set up in original definition. • This may lead you to use global variables!

  15. Building project Requirements • Make use of at least 2 if not more sensors • Cause change in the environment • This could be ‘making’ another robot move • Can build new robot. • NOTE: the base robot is called the Tribot • Can use on-line directions • Can use on-line programs BUT need to add/amend them • Can be same teams or different teams. • Can be multiple robots (rather, multiple NXT bricks)

  16. Requirements • Present proposal next class. • Final project: • Demonstrate • 1 page summary, including pictures and/or diagrams • NXT-G code must contain comments • Consider using MyBlocks • Extra credit for making video and uploading to YouTube

  17. Ideas? www.nxtasy.com (see also the projects archive) has several project ideas, including: • more elaborate maze • Going into 'building' and finding … something

  18. Ideas? mindstorms.lego.com/nxtlog • Many projects, with photos and code • You must understand the code as well as the rationale in the physical design. EXTRA credit for any accepted project. (Yes, I will change a grade if this happens after grades are submitted.)

  19. Homework • Postings • Prepare proposal for building project 4/19 • Projects presented 5/7

More Related