Bluetooth Remote Control Using Bluetooth and the Rotation
Bluetooth Remote Control Using Bluetooth and the Rotation sensors in NXT motors, it is possible to create a remote-controlled robot using two NXT bricks. This Power. Point shows how to make a simple remote control, but there ample opportunities for extension. Educate. NXT
Making a Remote Control The simplest remote control is made by attaching “paddles” to the NXT motors. An example is shown below. Educate. NXT
Programming Steps • When a paddle on the Remote Control (RC) is pushed forward, the Rotation sensor inside the NXT motor is read and passed by Bluetooth to the Edu. Bot brick. • The above step is done for both paddles and placed in an indefinite loop. • Upon receiving the Rotation sensor readings, the Edu. Bot program wires these values into the Power input on a respective Move block for each wheel. • The Edu. Bot program is also placed in an indefinite loop so Bluetooth messages can be continually received from the paddle remote control. Educate. NXT
Programming the RC First step is to Zero the Rotation sensors The following text can be displayed on the NXT Screen: “Place paddles in an upright starting position – then press the orange button to begin. ” Note: You need a new Display block for each line of text – and deselect the clear check box for every display icon except the first. Wait for Press of the Orange Button. Reset the Rotation Sensors on the Paddles. Educate. NXT
Programming the Remote Control Add to previous blocks Now for recording Paddle position and sending. 1. Read the value for the B Rotation sensor. 2. Pass this message to the Btooth block for sending (via Mailbox 1). 3. Read the value for the C Rotation sensor. 4. Pass this message to the Btooth block for sending (via Mailbox 2). 5. Put all the above in an indefinite loop. Educate. NXT
Programming the Edu. Bot Start a new program: 1. Receive the Bluetooth value for Mailbox 1. 2. Wire this into a Motor B block. 3. Receive the Bluetooth value for Mailbox 2. 4. Wire this into a Motor C block. 5. Put all the above in an indefinite loop. Educate. NXT
Download Programs Download the two programs to the Remote Control and Edubot respectively. Ensure the Edu. Bots have established a Bluetooth connection. For more on how to do this go to Educate. NXT Establishing a Bluetooth Connection Power. Point The world is now your remote oyster! Educate. NXT
Educate. NXT
- Slides: 8