What is the Serial Monitor?

The serial monitor is a screen that displays data between the computer and the Smart Inventor board. This lesson will show you how use the Serial Monitor and how to program the Inventor Board to output data that can be seen on the computer screen using the serial monitor.

Using the Serial Monitor

The serial monitor can be prompted by clicking on the magnifying glass on the upper right hand side of the Arduino IDE

By clicking on this eyeglass icon to gain access to the serial monitor which is a stream of data being displayed on the computer. The serial monitor will only display data if it is in “sync” with the baud rate of the programmed Smart Inventor board and if the board is actually programmed to output data.

Once you click the serial monitor icon a new window should appear on your computer. This new window is the serial monitor.

On here you have a send button that allows you to type information into it and send it to the Smart Inventor board or whatever board that is connected. Using this features allows you to do such things as controlling your robot with your computer and keyboard just like a remote control by sending characters or numbers. You can of course receive information from the board with the serial monitor such as the distance a sensor is reading.

Programming the Serial Monitor

To begin programming the serial monitor begin by typing within the void setup()  method.

this line of code sets the amount of bits per second that the Smart Inventor will be sending data at to the computer.

Serial.begin( )

Serial.Begin( BAUD rate);

This function will establish a high transfer BAUD connection between the remote and the board. The higher the BAUD number the faster the board will process information, but may yield a high chance for errors. The lower the BAUD number the slower the board will process information, but may yield a low chance for errors.

Acceptable BAUD rates range from 300 to 250000. Make sure that the BAUD rate is a number that is found within the lower right corner of the Serial Monitor.

Next inside the void loop we will begin to type the command that will output data onto the serial monitor. This message will be output from the Smart Inventor board once it is uploaded.

The command  Serial.println("Some words")  prints a new line with the text inside the ” ” signs. The ln creates the message on a new line. If the command Serial.print("some more words")  was used without the ln part, the words would be on the same line as the last message.

Normally since the program is looping it would output the message as fast as the board could. For this reason we must place a delay at the very end. Just to slow it down.

And you are done. Here is the final code

Upload this code to your board and then open up the serial monitor and you should be able to see the message “Hello World”