Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bluetooth example Presentations Lab: building projects

Similar presentations


Presentation on theme: "Bluetooth example Presentations Lab: building projects"— Presentation transcript:

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

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


Download ppt "Bluetooth example Presentations Lab: building projects"

Similar presentations


Ads by Google