280 likes | 763 Views
Bluetooth Communication. Module 3. Warm Up. SWQ: 30 – Oct. – 2013 Give examples where Bluetooth technology is used What is the range for the Bluetooth ?. NXT and Bluetooth. Search for projects that uses Bluetooth in the NXT.
E N D
Bluetooth Communication Module 3
Warm Up • SWQ: 30 – Oct. – 2013 • Give examples where Bluetooth technology is used • What is the range for the Bluetooth ?
NXT and Bluetooth Search for projects that uses Bluetooth in the NXT
What blocks I need to build Bluetooth communication between two NXT ??
Send message block: send a wireless message to another NXT Receive message block: receive a wireless message from another NXT
The send message block can be configured using either the configuration panel or using data wires Connection Mail Box text I will send Number I will send logic I will send X = -2 -2
Ahmed X = Ahmed X = 1 1
The receive message block can be configured using either the configuration panel or using data wires Mail Box number The test text The test Number The test logic Message received (yes/N0) If the test message and received message the same, output is True The received text The received Number The received logic
Why do I need to compare between the test message and the received message ?
Correct Communication • Connection Number on the computer and the chosen one on the NXT must be the same • Mail box of the transmitter and the receiver must be the same
LABACTIVITY1: • Step 1: Turn on Bluetooth on both NXT • Step 2: Rename the NXTs (TX# and RX#) • Step 3: SEARCH for RX# on the TX# NXT <> (connection is made)
LABACTIVITY1: (Page 11) • Step 4: Sender Program • Step 5: Receiver Program , • Step 6: Run the program on the receiver first Why ??
Connection Number: Mail box Number: Sent massage: Data type of the sent massage:
Connection Number: Mail box Number: Sent massage: Data type of the sent massage:
Connection Number: Mail box Number: Sent massage: Data type of the sent massage:
Connection Number: Mail box Number: Sent massage: Data type of the sent massage:
Review Exercise – Page 17 • Sender Program: • The sender unit will read the sound level • The sender will display the sound level values on its screen and send them wirelessly to a receiver unit • Receiver Program: • The receiver unit will receive the sound level values. • If the sound level values are more than 50%, the receiver unit will move forward; otherwise, it will stop moving.
LABACTIVITY2: Remote Control Program
LABACTIVITY2: Car Program This looks confusing ??!! Read it step by step, it will be easy
Conclusion • Send massage block • Receive massage block • Set up the Bluetooth on both NXTs • Sender program • Receiver Program