How to control Arduino via Bluetooth

Arduino Arduino UNO BlueSMiRF Bluetooth HC-05 HC-06 Microcontroller RFCOMM

arduino-uno-bluetooth-sparkfun-bluesmirf.jpg

Arduino


Arduino boards are electronic boards that can be programmed to perform various automation tasks. An Arduino can be the "brain" of an electronic gadget, IoT device or robot.

Arduino vs Microcontroller (MCU)


An MCU is the programable chip itself. Besides applying power, it requires some more external components attached in order to work. An Arduino board is basically the MCU + the external components + fancy connectors for fast prototyping.

Arduino and Bluetooth


The most popular Arduino development board is the Arduino UNO. It does not include any communication like Bluetooth or WiFi, but users can easily attach an external module to it. Popular Bluetooth modules are: BlueSMiRF, BTM-222, HC-05, HC-06. The minimum of 4 pins are required to be connected: Power, GND, Rx, Tx. Such a Bluetooth module implements the RFCOMM protocol that creates a wireless serial port communication via Bluetooth.

Arduino, Bluetooth and RoboRemo


To control your Arduino via Bluetooth, there are these steps to follow:
1. First you write the code for your Arduino, program it and test with the Serial Monitor. Example function: you send some character to turn ON and OFF the built-in LED.
2. Attach the Bluetooth module to the Arduino.
3. In android settings, go to Bluetooth -> pair new device and search for the Bluetooth name of your module and pair it.
4. Open RoboRemo, go to menu -> edit UI, add buttons, configure the strings to send when you press them, then exit the UI editor.
5. Go to menu -> connect -> Bluetooth (RFCOMM) and select the Bluetooth module from the list of already paired devices.
6. Enjoy controlling you Arduino with RoboRemo.


Share Post