Example Code for Arduino-Basic Serial Echo
Last revision 2025/12/24
This section is focused on the basic function of Bluno. You can easily develop your own Android application based on this Demo. This Sketch only do one thing that replies the same message received from Serial port.
Hardware Preparation
- Bluno - An Arduino Bluetooth 4.0 (BLE) Board x1
- Android 4.3+ Devices Or IOS 7.0+ Devices x1
- Micro USB cable x1
Software Preparation
- Install the Arduino IDE.
- For Android: Install the APK file into your Android phone.
- For iOS: Compile the source code into your apple device.
Wiring Diagram
No additional wiring is required. Connect Bluno to your computer via the Micro USB cable.
Other Preparation Work
- If you stuck in any of the following process, Go to Trouble Shooting section for help.
- Select the "Arduino Uno" as the target board in Menu->Tools->Board and its serial port.
- NOTE: If the Bluno was connected, i.e. the LINK led is ON, then it will fail to upload any sketch since the Serial port was occupied by the BLE. Please unlink the connection.
Sample Code
void setup() {
Serial.begin(115200); //initial the Serial
}
void loop() {
if (Serial.available()) {
Serial.write(Serial.read());//send what has been received
Serial.println(); //print line feed character
}
}
Result
For Android
- After connected, Click the "Send Data" button(②) to send the message in the text view(③) to Bluno.
- The Bluno will reply with the same data. Thus you can see the same "received data" (④).
- Notice that the on-board RX and TX led will blink when sending and receiving the message.


For iOS
- After the Connection state change from "Not Ready!" to "Ready!" (①), Click the "Send" button(④) to send the message in the text view(③) to Bluno.
- The Bluno will reply with the same data. Thus you can see the same "received data" (⑤).
- Notice that the on-board RX and TX led will blink when sending and receiving the message.
Was this article helpful?
