Difference: RemoteControlThroughBluetooth (4 vs. 5)

Revision 52017-11-24 - uli

Line: 1 to 1
 
META TOPICPARENT name="RobotSoftware"

Remotely controlling the Robot through Bluetooth

Changed:
<
<
In order to control the robot remotely some RF network connection is needed to send movement commands to the robot. The idea is to connect a joy stick to a Raspberry Pi, which has a Bluetooth controller incorporated. Depending on the readout of the joy stick commands will be sent to the Arduino controlling the robot, which make the robot drive forward, backward, left of right and with different speeds.
>
>
In order to control the robot remotely some RF network connection is needed to send movement commands to the robot. The idea is to connect a joy stick to an Arduino Nano equipped with an HC-05 Bluetooth module that can be programmed as a Bluetooth master. The robot itself is equipped with an HC06 Bluetooth slave module. Depending on the readout of the joy stick, commands will be sent to the Arduino controlling the robot, which makes the robot drive forward, backward, left of right and with different speeds.
 

The HC-06

The HC-06 module is a serial transceiver module that is interfaced by a serial port with 3.3V signal level on one side and the Bluetooth RF on the other. In our case we will connect the HC-06 through a serial port to the Arduino and communicate with the remote controller through Bluetooth. This Bluetooth module allows to send ASCII text from the Bluetooth master to its client and back. Instead of being connected through a serial cable we are connected through the Bluetooth RF signal.

Line: 62 to 62
  Since the HC-05 and the HC-06 look like ordinary serial lines from the controller point of few we define a serial protocol to send commands from an Arduino Nano, equipped with a joystick that is part of the 37-sensor kit and the HC-05 configured as a Bluetooth master to the Arduino Uno on the robot equipped with the HC-06.
Added:
>
>
Finally we have to add motor control to the receiver part of the protocol and we are done.
Here are the final Arduino sketches:

A sketch to test joystick readout and conversion of the two joystick values into for motor movement values:

https://afnog.iotworkshop.africa/pub/Embedded_Systems/RemoteControlThroughBluetooth/joystick.ino

Then the protocol test sketches

https://afnog.iotworkshop.africa/pub/Embedded_Systems/RemoteControlThroughBluetooth/sender.ino and

https://afnog.iotworkshop.africa/pub/Embedded_Systems/RemoteControlThroughBluetooth/receiver.ino

and the final remote control sketch, which is essentially the protocol receiver sketch with motor control integrated into it.

https://afnog.iotworkshop.africa/pub/Embedded_Systems/RemoteControlThroughBluetooth/remoteControl.ino

 -- Uli Raich - 2017-04-27

Comments

Line: 81 to 97
 
META FILEATTACHMENT attachment="hc06Test.ino" attr="" comment="" date="1508768136" name="hc06Test.ino" path="hc06Test.ino" size="1089" user="uli" version="1"
META FILEATTACHMENT attachment="serial.tar.gz" attr="" comment="" date="1509113358" name="serial.tar.gz" path="serial.tar.gz" size="13241" user="uli" version="1"
META FILEATTACHMENT attachment="HC-0305_serial_module_AT_command_set_201104_revised.pdf" attr="" comment="" date="1509115228" name="HC-0305_serial_module_AT_command_set_201104_revised.pdf" path="HC-0305_serial_module_AT_command_set_201104_revised.pdf" size="85689" user="uli" version="1"
Added:
>
>
META FILEATTACHMENT attachment="remoteControl.ino" attr="" comment="" date="1511519735" name="remoteControl.ino" path="remoteControl.ino" size="5424" user="uli" version="1"
META FILEATTACHMENT attachment="receiver.ino" attr="" comment="" date="1511519735" name="receiver.ino" path="receiver.ino" size="3333" user="uli" version="1"
META FILEATTACHMENT attachment="sender.ino" attr="" comment="" date="1511519735" name="sender.ino" path="sender.ino" size="4048" user="uli" version="1"
META FILEATTACHMENT attachment="joystick.ino" attr="" comment="" date="1511519735" name="joystick.ino" path="joystick.ino" size="2118" user="uli" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback