This Application note is focused on showcasing the steps involved in interfacing Blue B with UDOO. Blue B is a simple breakout board for the Bluetooth Module.For more details about Blue B visit our webstore or click here.
Step 1:
Open an Arduino IDE which is in the UDOO Desktop and write a simple program to receive the value from smartphone using Bluetooth. A small Snapshot of the code with the IDE on the UDOO is depicted below :
void setup()
{
Serial1.begin(9600);
Serial.begin(9600);
}
void loop()
{
if (Serial.available() > 0)
{
char a =Serial1.read();
Serial.println(a);
}
}
Screenshot of Blue B coding
Step 2:
Hardware Connection:
Connections Needed:
- Rx
- Tx
- 3.3v
- GND
Blue B serial port Rx and Tx has to communicated with Tx1 and Rx1 of UDOO(which is J5 Header) and then 3.3v and GND is available in the J23 header.
Sending values from Smartphone:
Here we are using an Android which is specially made for controlling Robot using Bluetooth.
Screenshot of the Bluetooth_Robot App
Step 3:
On Scanning from the App window all available Bluetooth devices are displayed. Please select the one relevant to the Blue B as shown in the figure below.
Step 4:
Pair the Blue B with the Default pin number “1234” and connect a device to the smartphone. On successful connection a notification is available on the App window.
Step 5:
Upload a sketch and open the serial monitor. As for a demo purpose here we are just receiving the value sent from smartphone. For the front and back button presses we will receive a value “F” and “B” and for the left and right button “L” “R” and then finally for stop button “S”. A working setup of the experiment should look similar to the snapshots below.
Blue B + UDOO in YouTube :
For queries: info@tenettech.com
Contact: 080-26722726