Simple Serial Monitor

Simple Serial Monitor is yet another stand alone replacement for the Arduino serial monitor. It is text only and is far from being a fully fledged terminal app. It does have a couple of features that make it a little better than the regular Arduino serial monitor, especially when used with UART modules like the Bluetooth modules I often play with.

Simple Serial Monitor was created as an example of using the serial port in Visual Basic NET. The app is written in Visual Basic.NET (Framework) and uses .NET 4.8. NET 4.8 is an older version of .NET that has drag & drop serial ports in the designer making serial ports a little easier to implement.

The compiled app does not need installing and can be run by double clicking the file. You can download the app and the source files below.

Simple Serial Monitor talking to a Bolutek BC04 Bluetooth module

Controls

Enable/disable automatic scrolling in the main window.

Make the main window text smaller
Make the main window text larger

The mini scale in the middle indicates the current text size

Enable and disable showing system messages in the main window. System messages are displayed in red.
Show things like, when a connection has been made or broken, error messages.

When checked, sent text is copied to the main widow. Sent text is displayed in blue.

Contains a list of common baud rates.
300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 74880, 115200, 230400, 250000, 500000, 1000000, 2000000

List containing line end characters,
– Both NL & CR
– No line Ending
– Carriage return (CR)
– New Line (NL)

COM port list and connect/disconnect button.
The COM port drop down lists contains the available COM ports. This list is automatically updated when there isn’t an active connection.

Serial port settings button. Click to open the settings panel:

The serial port settings panel has settings for
– Data Bits
– Parity
– Stop Bits
– Character encoding

Arduino serial default to Data Bits: 8, Parity: None, Stop Bits: 1. This is also known as 8N1.

Data Bits
– 5 Bits
– 6 Bits
– 7 Bits
– 8 bits

Parity
– None
– Odd
– Even

Stop Bits
– 1 bit
– 2 bits

Character Encoding (Encoding)
– Default (The system default)
– UTF8
– Unicode
– ASCII
– UTF7
– UTF32

Use Simple Serial Monitor With An Arduino

Simple example just to show things working. An Arduino connected to a computer via a usb cable.

Sketch

Simple sketch to demonstrate using serial in to tuen an LED on and off.
A ‘1’ turns the built in LED on, and a ‘0’ turns it off.

/*
 *  sketch: Serial_simple_serial_test
 *  www.martyncurrey.com
 *  
 *  Turn the built in LED on and off using simple serial commands.
 *  1 for on
 *  0 for off
 *  
 */

const int LED_PIN = 13;
char c=' ';

void setup() 
{
  pinMode(LED_PIN, OUTPUT);
  digitalWrite(LED_PIN, LOW);

  // 8N1 is the default setting for the Arduino serial monitor
  Serial.begin(9600,SERIAL_8N1 );
  Serial.println("Arduino ready");
}

void loop() 
{
  // Read from serial 
  if (Serial.available())
  {
      c = Serial.read();
      if      (c=='1') { digitalWrite(LED_PIN, HIGH); Serial.println("LED is ON"); }
      else if (c=='0') { digitalWrite(LED_PIN, LOW);  Serial.println("LED is OFF");}
  }
}

Connect an Arduino, upload the above code.

Open Simple Serial Monitor by double clicking the main file

Simple Serial Monitor will open

I have used the program before and there are previous settings which have been loaded. The settings are kept in the simpleSerial.ini file. If simpleSerial.ini does not exist it will be created when the program is run.

Select the COM port the Arduino is connect to

and click the connect button

If System Messages is checked, you will see a “Serial port open” message in red.
If the Arduino is connected correctly, it will restart and send a “Arduino ready” message.

Congrats. You are connected.

In the send text box, type 1 and click SEND (or hit the Enter key).

If you have Show Sent checked, the 1 you entered will be displayed in blue in the main window.
The Arduino will reply with a “LED is ON” message.
On the Arduino, the built in LED turns on.

To turn off the LED, enter a 0 and click SEND


On the Arduino, the LED turns off.

The Visual Basic Code

click here to open the code in a separate window. Displays as a flat text file.

The best way to see the code is to download the project files and view in Visual Studio.

I won’t do a code run through as I have included plenty of comments in the code to explain things. However, if you have a question leave a comment below.

Downloads

Ready To Run Binary

Simple Simple Monitor V1.0.0.1
The download is a zip file. Unpack and double click the main file to run.

Visual Basic.NET Source Files

Created in Visual Studio 2022, Visual Basic.NET (Framework) with NET 4.8
Simple Serial Monitor V1.0.0.1 Visual Basic.NET source files

Leave a Comment