View Serial Monitor Over Bluetooth

View Serial Monitor Over Bluetooth © CC BY-NC-SA

Use a Bluetooth module to replace a traditional wired connection for transmitting serial data.

  • 4,993 views
  • 9 comments
  • 29 respects

Components and supplies

Apps and online services

About this project

This project uses an HC-05 Bluetooth module to replace a traditional wired connection used for viewing the serial monitor.

Materials:

As an Amazon Associate I may earn from qualifying purchases.

Step 1: Code

This code is a simple serial communication example taken from the provided examples in the Arduino IDE. You can find it in: File > Examples > Communication > Ascii Table

/*
 ASCII table
 Prints out byte values in all possible formats:
 - as raw binary values
 - as ASCII-encoded decimal, hex, octal, and binary values
 For more on ASCII, see http://www.asciitable.com and http://en.wikipedia.org/wiki/ASCII
 The circuit: No external hardware needed.
 created 2006
 by Nicholas Zambetti <http://www.zambetti.com>
 modified 9 Apr 2012
 by Tom Igoe
 This example code is in the public domain.
 http://www.arduino.cc/en/Tutorial/ASCIITable
*/
  
void setup() {
  
 Serial.begin(9600);
  
while (!Serial) {
   ; // wait for serial port to connect. Needed for native USB port only
 }
  
 Serial.println("ASCII Table ~ Character Map");
}
  
int thisByte = 33;
  
void loop() {
  
 Serial.write(thisByte);
  
 Serial.print(", dec: ");
 Serial.print(thisByte);
  
 Serial.print(", hex: ");
 Serial.print(thisByte, HEX);
  
 Serial.print(", oct: ");
 Serial.print(thisByte, OCT);
  
 Serial.print(", bin: ");
 Serial.println(thisByte, BIN);
  
 if (thisByte == 126) {   
   while (true) {
     continue;
   }
 }
 thisByte++;
  
}
  • Make sure your baud rate is set to 9600
  • Almost any code that uses a serial connection to the computer will work, but this is just a simple example.

Step 2: Circuit

After the code has been uploaded to the board, disconnect the power. Next, Attach the Bluetooth module to the circuit as seen above:

  • GND to Ground
  • VCC to 5v pin
  • TXD to pin 0
  • RXD to pin 1

Step 3: Bluetooth Connection

  • Power on the Arduino
  • Open your computer's Bluetooth settings
  • Pair with the HC-05 module:

  • Find the module's serial port name in "devices and printers":

  • In the Arduino IDE, choose serial port of Bluetooth module (mine is COM10)
  • Open the serial monitor as normal to view incoming information

Further steps

Here are some optional things you may want to try out:

  • You can use virtual serial ports instead, but I found that using the real ones works a lot faster (and it's generally easier).
  • You can also use this process with the standard Firmata example to allow for wireless control with Processing (set the speed to 9600 first)

Code

CodeArduino
/*
 ASCII table
 Prints out byte values in all possible formats:
 - as raw binary values
 - as ASCII-encoded decimal, hex, octal, and binary values
 For more on ASCII, see http://www.asciitable.com and http://en.wikipedia.org/wiki/ASCII
 The circuit: No external hardware needed.
 created 2006
 by Nicholas Zambetti <http://www.zambetti.com>
 modified 9 Apr 2012
 by Tom Igoe
 This example code is in the public domain.
 http://www.arduino.cc/en/Tutorial/ASCIITable
*/

void setup() {

 Serial.begin(9600);

while (!Serial) {
   ; // wait for serial port to connect. Needed for native USB port only
 }

 Serial.println("ASCII Table ~ Character Map");
}

int thisByte = 33;

void loop() {

 Serial.write(thisByte);

 Serial.print(", dec: ");
 Serial.print(thisByte);

 Serial.print(", hex: ");
 Serial.print(thisByte, HEX);

 Serial.print(", oct: ");
 Serial.print(thisByte, OCT);

 Serial.print(", bin: ");
 Serial.println(thisByte, BIN);

 if (thisByte == 126) {   
   while (true) {
     continue;
   }
 }
 thisByte++;

}

Schematics

Schematic
Bluetooth jezpemmtxd

Comments

Similar projects you might like

Using Serial Monitor to Control Servo Motor

Project tutorial by Kub_Luk

  • 7,671 views
  • 9 comments
  • 35 respects

Generic Serial Bluetooth with Win 10 IoT-Core RPI2

Project tutorial by David Jones

  • 8,966 views
  • 8 comments
  • 33 respects

Otto DIY+ Arduino Bluetooth Robot Easy to 3D Print

Project tutorial by Team Otto builders

  • 57,058 views
  • 122 comments
  • 185 respects

Robotic Car controlledover Bluetooth with Obstacle Avoidance

Project showcase by S.Ranjith Reddy

  • 11,406 views
  • 8 comments
  • 19 respects

Bluetooth Controlled Car

Project tutorial by JANAK13

  • 10,973 views
  • 19 comments
  • 38 respects

Bluetooth Controlled Servo

Project tutorial by JANAK13

  • 4,713 views
  • 16 comments
  • 31 respects
Add projectSign up / Login