View Serial Monitor Over Bluetooth
by millerman4487 in Circuits > Arduino
9621 Views, 8 Favorites, 0 Comments
View Serial Monitor Over Bluetooth
![bluetooth.png](/proxy/?url=https://content.instructables.com/FCA/6UJM/JUQSLBB4/FCA6UJMJUQSLBB4.png&filename=bluetooth.png)
This project uses an HC-05 Bluetooth module to replace a traditional wired connection used for viewing the serial monitor.
Materials:
- Arduino - https://amzn.to/2DLjxR2
- Breadboard - https://amzn.to/2RYqiSK
- Jumper wires - https://amzn.to/2RYqiSK
- HC-05 Bluetooth module - https://amzn.to/2RYqiSK
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.
Circuit
![bluetooth.png](/proxy/?url=https://content.instructables.com/FCA/6UJM/JUQSLBB4/FCA6UJMJUQSLBB4.png&filename=bluetooth.png)
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
Bluetooth Connection
![sharedscreenshot_ymy0Czp2ud.jpg](/proxy/?url=https://content.instructables.com/F7P/XP4B/JUQSLBCQ/F7PXP4BJUQSLBCQ.jpg&filename=sharedscreenshot_ymy0Czp2ud.jpg)
![sharedscreenshot_K1t4jowjb2.jpg](/proxy/?url=https://content.instructables.com/FTH/9MBV/JUQSLBBI/FTH9MBVJUQSLBBI.jpg&filename=sharedscreenshot_K1t4jowjb2.jpg)
![sketch_feb18a___arduino_1_8_8_2_18_2019_8_46_44_am_qD4WF6JMHG.jpg](/proxy/?url=https://content.instructables.com/FOL/8L9H/JUQSLBDE/FOL8L9HJUQSLBDE.jpg&filename=sketch_feb18a___arduino_1_8_8_2_18_2019_8_46_44_am_qD4WF6JMHG.jpg)
- 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)