1 / 9

Robotics

Robotics. Bluetooth example Presentations Lab: building projects. Bluetooth. and all communication protocols Subject to timing variability. Sends and receives done on digital schedule, not continuously Message transmission is not instantaneous . My example. keybt Runs on master

hagop
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 Bluetooth example Presentations Lab: building projects

  2. Bluetooth and all communication protocols • Subject to timing variability. Sends and receives done on digital schedule, not continuously • Message transmission is not instantaneous

  3. My example • keybt • Runs on master • Loop: Waits for touch sensor, NXT left arrow, or NXT right arrow • When one is pressed, send BT 1, 2, or 3 • Displays number • getmsg • Runs on slave. Must be started first. • Loop to receive BT numeric message • Displays message

  4. keybt

  5. keybt

  6. getmsg

  7. Cautions • Make sure sending and receiving same datatype, in this case number • Also correct connection, correct mailbox. In this case, 1 (only connection) and 1. • The nbr variable initialized and reset to zero is used to signal if something has been pressed AND what has been pressed. • advantage of numbers • comparing numbers built in • There are text operations that can be downloaded from nxtasy: http://nxtasy.org/2007/05/30/text-manipulation-nxt-g-blocks/

  8. Suggestions (Do as I say, not as I just did…) • Make multiple block sections for display into MyBlocks • Experiment with pauses. More or less may be better. • ?

  9. Building projects • Do small experiments • Write out plans (logic) • Iterate

More Related