Usage Example for Arduino-Android Communication
Last revision 2026/01/12
This guide offers a comprehensive example of establishing communication between an Arduino UNO and an Android device using a Bluetooth module, complete with hardware and software setup instructions, Bluetooth configuration, and sample code for transmitting and receiving data.
Hardware Preparation
- DFR0216 DFRduino UNO R3 ×1
- DFR0265 IO Sensor Expansion Board V7 ×1
- TEL0026 DF-Bluetooth Module V3 ×1
- FIT0056 USB Cable ×1
- TEL0010 USB to TTL ×1
- Android Phone (compatible with Bluetooth Terminal app)
Software Preparation
- Download and install the Arduino IDE: Click to Download Arduino IDE
- Download and install the Bluetooth TerminalClick to Download Bluetooth Terminal (Android app)
Note: If you cannot install, please click to check if your phone is on the list. If not, then sorry you cannot use this APP.You can directly install Google Play Store on your phone, then search this APP in it.
Bluetooth Module Configuration
- Both module and mobile phone can be used as master or slave.
- Set the baud rate of the module to 115200.
- Connection Mode: if the module cannnot be searched/connected by/with adapter or PC, this parameter needs to be configured:AT+CMODE=1.
Hardware Connection
- Mount the Bluetooth module on the IO shield → plug into UNO.
- Connect UNO to the PC via USB.

Operation Steps
-
Install the Bluetooth Terminal app on the phone.

-
Pair the phone with the module:
- Open phone Bluetooth settings → pair with the module (passkey: "1234").

- In the app: "Connect a device-Secure" → select "Bluetooth_V3" (LINK-LED stays on if successful).


-
Burn test code to UNO (follow shield-specific instructions).
Note:
- When burning the program to UNO, please select the serial port number of UNO instead of Bluetooth. The baud rate setting in the program should be consistent with that of your Bluetooth module.
- If you are using the new I/O shield, please dial to prog before downloading codes, and then dial back to run when finished.
- If you are using the old I/O shield, then please unplug the Bluetooth module when downloading codes. Replug it after the codes burning is done.
- If the connection is lost during code downloading, please reconnect and try.
Sample Code
UNO as Transmitting End
void setup()
{
Serial.begin(115200); //Init serial port and set baud rate to 115200
}
void loop()
{
Serial.print("Hello!"); //Serial port send out string
Serial.println(" DFRobot"); //Serial port send out string with carriage return
delay(1000); //delay
}
UNO as Receiving End
void setup(){
Serial.begin(115200); //Init serial port and set baud rate to 115200
}
void loop(){
char val;
val = Serial.read(); //Read serial port
if(val!=-1){
Serial.print(val); //Send out the received data again via serial port
}
}
Running Results
- Transmitting UNO → Receiving Phone: The app displays "Hello! DFRobot" periodically.
- Transmitting Phone → Receiving UNO: Input text in the app → view received data in the Arduino serial monitor.
Was this article helpful?
