Arduino Serial Monitor

Posted on

The text you see in the serial monitor window, the one shown enlarged, at the right, is just a sample. That text was specified in the code being put into the Arduino under development. And what if, later, nothing is connected to the relevant pins? The Arduino won't 'care' if you aren't 'listening' when it 'speaks'.

(If you already know about this use of the Serial Monitor, what about using it to send data to the connected Arduino? I also have notes for you on from the development machine. An Arduino with one push button and one LED is a computer. But even your friends may ask you what that's good for. You can make a quantum leap on the output front without buying anything beyond the basic Arduino. This How To tells you about using the output half of the serial stream. Before we start: A WARNING!!

This window is called the Serial Monitor and it is part of the Arduino IDE software. Its job is to allow you to both send messages from your computer to an Arduino.

' Serial' and ' RS-232' are NOT just two ways of saying the same thing. RS-232 comms do use serial data, so you might think that you can just hook up the serial 'stuff' I'm going to talk about.

Including your Arduino. To RS-232 devices. Or to the RS-232 port of a big PC. (They can be connected. But there are a few details to get right.) All the ins and outs of that are beyond the scope of this tutorial. I've inserted this warning just in case someone is tempted to 'extend' the ideas here, hook an Arduino directly to something RS-232.

And fry their Arduino! (If you want to connect to RS-232, search on 'Arduino MAX323'.) The serial monitor lets you.

The serial monitor lets you see anything the Arduino sends to its serial port. (When I speak here of 'its port', I mean one built into most (all?) Arduinos (and clones), used for programming the devices. On traditional Arduinos (Uno, Pro Mini, etc), it uses pins 0 and 1. As I just said: These pins are also connected to the electronics which the Arduino development environment uses for programming the Arduino. You can use them both for the programming task, and for the serial monitor at (almost) the same time. (With care, they can even be used for more things, but that's a story for another page.) Before I go on. This page is about the relatively simple.

And broadly useful. Use of the serial monitor.

Other 'stuff' can be sent to and from other hardware, including big PCs, over a serial channel, to a program running in the other hardware. That is all a bit beyond just using the serial monitor, but I mention it in passing, in case you wondered. (anywhere you see 'Delphi' there, you can probably substitute '.) As I said, this page is about using the serial monitor to watch 'stuff' going to the development PC from the Arduino. Enter the following and run it. We'll do something more useful in a moment, don't worry. String sVersID='vers 20 Feb 17' No, of course, you won't always have the Arduino connected to a big PC and the serial monitor turned on.

But the code above does no harm in those circumstances. (Unless you want to use the pins associated with it for other things.) And when you DO have the serial monitor connected, the program and version information can be very useful. I hope this tool proves useful to you in your development work. There may even be times when you find it useful in a finished project, but of course that would only be a project where your PC remained connected to the Arduino while the Arduino did whatever you set it up to do.

Perhaps not a scenario which is going to arise often, but there's no reason it couldn't ever arise. Or powered by Site search Web search The search engine is not intelligent. It merely seeks the words you specify. It will not do anything sensible with 'What does the 'could not compile' error mean?' It will just return references to pages with 'what', 'does', 'could', 'not'.

Arduino serial monitor commandsArduino serial monitor garbage

In addition to the tutorials for which this page serves as Table of Contents, I have other sites with material you might find useful. On Arduino programming and electronics interfacing. (If you experienced Adabas with Star Office, ooBase is nothing like it!) If you from here, it helps me. They host my website, and I wouldn't put this link up for them if I wasn't happy with their service.

Arduino Serial Monitor Input

Ad from page's editor: Yes. I do enjoy compiling these things for you. Hope they are helpful. This doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated! And if you liked that, or want different things, here are some more pages from the editor of these tutorials.

Apologies if the '?FrmAht' I added to that link causes your browser problems. Please let me know, if so? To email this page's editor, Tom Boyd. Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at Why does this page cause a script to run?

Because of the Google panels, and the code for the search button. Why do I mention the script?

Be sure you know all you need to.

The Arduino IDE has a feature that can be a great help in debugging sketches or controlling Arduino from your computer's keyboard. The Serial Monitor is a separate pop-up window that acts as a separate terminal that communicates by receiving and sending Serial Data. See the icon on the far right of the image above. Serial Data is sent over a single wire (but usually travels over USB in our case) and consists of a series of 1's and 0's sent over the wire. Data can be sent in both directions (In our case on two wires). When you click on it, the Serial Monitor will pop up in a new window.

Arduino serial monitor software

Arduino Serial Monitor Software

Above is what our example Serial Monitor Sketch looks like with the Monitor opened. Look at the Serial Monitor window. The small upper box is where you can type in characters (hit or click 'Send'). The larger area (Corner can be dragged to enlarge) is where characters sent From Arduino will be displayed.- At the bottom are two pulldowns:.

One sets the 'line ending' that will be sent to Arduino when you or click Send. The other sets the Baud Rate for communications. (If this does not match the value set up in your sketch in Setup, characters will be unreadable). Example: Serial.begin(9600); Some sketches or other applications may use a different Baud Rate. If you are testing a new sketch you may need to know what's happening when you try to run it. But 'Software Is Invisible!

So you need the tell the software to tell you what it's doing, and sometimes the value of changing variables. You do this my using the Serial Monitor and adding code to your sketch to send characters that you can see.

SETUP: In Setup you need to begin Serial Communications and set the Baud Rate (speed) that data will be transferred. That looks like this: Serial.begin(9600); // Other baud rates can be used.

Serial.println('My Sketch has started'); The second line is optional. LOOP: Here you can print helpful info to the Serial Monitor. Examples: Serial.println('Top of loop'); Serial.println('Reading Temperature Sensor'); Serial.print('LoopCounter value = '); Serial.println(LoopCounter); For details of how to show different data, see 'SerialPrint.html' in the Reference section of your Arduino IDE: Top menu: Helpreference/SerialPrint.html Experiment with changing the Sample Software Sketch. More Arduino How-To on the. Nice tutorial. It might even be better to buffer incoming characters to some char array ans recognize complete commands using strstr function.

Or even better to use non ASCII characters to be more efficient. But for that you can not use built in Arduino IDE terminal, but you need some more advances RS232 terminal program such as Even with free version you can see all data in binary format and even set automatic strings for answer to be sent from PC that is triggered by incoming word from Arduino. I have a question. If I have uploaded a code on an Arduino mini pro from my mac using a USB and FTDI, with data that prints to the serial port. Then next time I plug in the Arduino, select the correct port ect, can i just open the serial monitor and see the data being printed to the serial monitor?

Or do i need to upload the code again? The reason I ask is because the code that was uploaded on the Arduino originally has not been saved, so I would like to use the sensor without uploading anything again. Plus i keep having issues with uploading so it would be good just to know that I dont have to upload again and again each time I connect the sensor to the computer! Thanks in advance! Hi Terry, I’m a newbie to Arduino.in the past I used Flowcode V4. I have a problem viewing the Serial Monitor, the pop-up window does not appear.I have tried it using your “How to use Arduino Serial Monitor” which I download from. I’m sure I have carried out your instructions correctly I did a “copy / paste” of the sketch then “Cntrl R” to verify and “Cntrl U” to upload without a hitch but the pop-up does not appear when I click on the sketch.

Cheers for now Manie 3 years ago.