View Serial Monitor Over Bluetooth

About: I am here to share what I make. Hopefully, you can learn from watching what I have done and even improve upon it. As an Amazon Associate I earn from qualifying purchases.

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

Materials:

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://www.asciitable.com 
 The circuit: No external hardware needed.
 created 2006
 by Nicholas Zambetti < http://www.asciitable.com >
 modified 9 Apr 2012
 by Tom Igoe
 This example code is in the public domain.
  http://www.asciitable.com 
*/
  
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

  1. Power on the Arduino
  2. Open your computer's Bluetooth settings
  3. Pair with the HC-05 module
  4. Find the module's serial port name in "devices and printers":
  5. In the Arduino IDE, choose serial port of Bluetooth module (mine is COM10)
  6. Open the serial monitor as normal to view incoming information

Step 4: 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)

Arduino Contest 2019

This is an entry in the
Arduino Contest 2019

Share

    Recommendations

    • Fandom Contest

      Fandom Contest
    • IoT Challenge

      IoT Challenge
    • Classroom Science Contest

      Classroom Science Contest

    Discussions