A very good wireless local area network (and personal) is undoubtedly the Bluetooth (BT). Today in our day-to-day is common to find us using cell phones, stereos, cameras, etc., interconnected with the help of the famous "blue little light”.
In the world of IoT and automation in general, it is very common find remote controls via mobile phones using BT technology. This is due to two basic components, but very important:
In this instructable, I will develop some ideas about controlling Arduino’s outputs through a mobile device in order to move a Robot, turn on lamps on a house, etc.
In the market is very common to find "Master-Slave" BT 3.0 modules as the HC-05 and "Slave" ones as the HC-06. More recently, appeared the HC-08 and HC-10 working with technology BT 4.0 or BLE ( "Bluetooth Low Energy"). The BLE modules are the only ones that can be connected to an iPhone, because unfortunately Apple does not provide support to BT 3.0.
For the projects discussed here, I will use an HC-06 that is very popular and cheap (Bye, bye, Iphone! Androids are kings here!). The BT module is powered with 5V which makes it to be easily connected to an Arduino UNO for example. His transmit (Tx) and receive (Rx) pins can be connected directly to the UNO, with no need of voltage dividers as we see in the case of ESP8266. Usually the HC-06 should be connected directly to pins 0 and 1 Arduino (“Serial 0”):
When using "Serial 0" inputs (the only HW Serial port at UNO), it is very important to remember that the HC-06 may not be physically connected to pins 0 and 1 during the program load, because the USB port also use the same serial. A simple way to get around this little problem (if your project does not use many GPIOs UNO) is to use a “SW serial port” through the library SoftwareSerial. In our case here, we will use the pins 10 and 11 of UNO (Tx, Rx respectively).