How to send commands from one Arduino board to another via Bluetooth?

Hello everyone,

I am still fairly new to Arduino and I'm curious if two separate Arduino boards can communicate with each other via Bluetooth (preferably without the aid of any external devices such as phones or tablets)? If so any information or links into how it can be done would be helpful!

Buetooth is essentially "serial by wireless". You could use the code in Serial Input Basics to receive the data and Serial.println() to send it. Note that at least one of the Bluetooth devices must be able to act as Master. The HC05 Bluetooth modules can act as master or slave but the HC06 can only act as slave.

For longer ranges you could use nRF24L01+ 2.4GHz transceiver modules - they are not expensive.

...R

Thanks for the reply!

So to begin with its just a matter of obtaining two of these HCO5 modules and connecting them to two separate Arduino boards?

I'm doing something similar using Microchip RN42 modules.

http://www.microchip.com/wwwproducts/Devices.aspx?product=RN42

They have a serial cable replacement mode and a fairly straightforward pairing mechanism.

They're not the cheapest (more than £10 per module), if you're flexible about the protocol then the RF modules suggested above might be cheaper. I'm using only Bluetooth to simplify regulatory approval.

tommy

LorenzoPDE:
So to begin with its just a matter of obtaining two of these HCO5 modules and connecting them to two separate Arduino boards?

You will need to issue a few commands to one of the HC-05 modules to make it a master.

You can purchase HC-05 modules for about $3 each.

We can help you with this when you have the modules.

These can also be used as either a master or slave device. These don't come with the little carrier board to make modules easier to use with 5V devices. I've only used these Electrodragon modules with 3.3V microcontrollers.

The EC04-B Module includes an "interrupt" pin. I believe this pin can be used to check if the module has received a new message.