SERIAL MONITOR
Upload the following sketch to your Arduino. Later on, we will see exactly how it works. _____________________________________________________________
/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the serial monitor.
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
// the setup routine runs once when you press reset:
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the serial monitor.
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600); } // the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.print("Sensor Value=");
Serial.println(sensorValue);
Serial.println(sensorValue);
delay(1000); // Interval between readings = 1 second }
_____________________________________________________________
After you have uploaded this sketch onto your Arduino, click on the right-most button on the toolbar in the Arduino IDE. The button is circled below.
The following window will open. You can see a steady stream of numbers ranging from 0-1023, correlating to the position of the potentiometer. As you turn your potentiometer, these numbers will respond almost instantly.
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 board (over USB) and also to receive messages from the Arduino. It is a separate pop-up window that acts as a separate terminal that communicates by receiving and sending Serial Data.
If you have questions, just comment below! Thank you.
31 comments
Write commentsMam Daisy, what will happen if there is no Serial Monitor in Arduino? :)
ReplyThe Arduino Integrated Development Environment - or Arduino Software (IDE) has a Serial Monitor that allows your computer to connect serially with the Arduino board. This is important because it takes data that your Arduino is receiving from sensors and other devices and displays it in real-time on your computer. If there's no Serial Monitor, you can't see and understand what number or values the chip is actually receiving. You can't debug sketches easily or you can't control Arduino using computer keyboard if there is no Serial Monitor.
ReplyNow i know :) Thank you Maam Daisy **
ReplyHi! Is it possible to see Graphic display on the Serial Monitor of Arduino?
ReplyMa'am Daisy, what other feature I can use other than Serial Monitor?
ReplyThe Arduino IDE includes a “Serial Monitor” which is decent for basic serial communication. If you are asking on what other feature of Arduino IDE that can be a substitute in Serial Monitor, we don't have alternative. But there are other alternatives terminal programs that can interact with your Arduino. Here are some alternatives: PuTTy [Windows], Screen [Max,Linux] and Processing.
ReplyIf you want to know more about these terminal programs, you can check it out in the link below.
https://www.baldengineer.com/alternatives-to-arduinos-serial-monitor.html
Okay ma'am. Thank you
ReplyWhat is meant by serial data?
ReplySerial Monitor receive and send Serial Data. Serial Data are data that 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. It means the process of sending data is one bit a time.
ReplySince I am not familiar with this. What arduino serial monitor can contribute to society?
ReplyThe Serial Monitor of Arduino can't stand alone without the Arduino IDE Software because it is one of the features in Arduino IDE.So your question is not about the Serial Monitor, not about the software but the Arduino itself. Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It’s intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments. According to the meaning it is flexible it means capable to adapt everywhere. It is easy to use. No need to explain. And it is intended for many professionals or even normal people. It can contribute to the society by creating a prototype that helps us to lessen our work and save our time.
Replymaam, i used your codes but when i switch on my arduino uno then i start looking in the serial monitor as i turn my potentiometer, nothings happen the data was stack to 0.
Reply/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the serial monitor.
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600); } // the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.print("Sensor Value=");
Serial.println(sensorValue);
delay(1000); // Interval between readings = 1 second }
Hi ma'am what is the function of serial monitor?
ReplyMaybe the connection of your potentiometer to the Arduino Board is not correct. Connect the three wires from the potentiometer to your board. The first goes from one of the outer pins of the potentiometer to ground. The second goes from the other outer pin of the potentiometer to 5 volts. The third goes from the middle pin of the potentiometer to the analog pin A0.
Replyok maam thank you
ReplyHi Mylene! The Serial Monitor can be a great help in debugging sketches or controlling Arduino from your computer's keyboard. It acts as a separate terminal that communicates by receiving and sending Serial Data.
ReplyWelcome Marco! Do you have another question regarding to Serial Monitor?
ReplyWelcome Rica! Do you have another question regarding to Serial Monitor?
ReplyWelcome CK! Do you have another question regarding to Serial Monitor?
ReplyHi! It is not possible to see Graphic Display on the Serial Monitor of Arduino. We can only see letters and numbers that you usually see in your everyday life. It is like something common and simple words that you programmed in your Arduino IDE.
ReplyHi pano po bumababa yung brightness nung sa LED? Pgkakaintindi ko kase 5V tas 0v, salitan ng mabilisan ung nangyyari.
ReplyHi Jn! In order to fade an LED in varying brightness, we need to used analogWrite function to do that. Connect the LED to any PWM pins as an output.
ReplyHi ma'am Daisy, why we should always place void loop() in the sketch even if we are not putting anything on it?
ReplyHi Carmela! There are two special functions that are a part of every Arduino sketch: setup() and loop(). The setup() is called once, when the sketch starts. It's a good place to do setup tasks like setting pin modes or initializing libraries. The loop() function is called over and over and is heart of most sketches. You need to include both functions in your sketch, even if you don't need them for anything.
Replycan we use other kind of switch like rotary switch aside from potentiometer?
ReplyHi Maria Mercedes! Yes we can used other kind of switch like rotary, slide, toggle,rocker, knife, pushbutton as long you know how to used it and your program is different from other switch because they outputs is different.
Replymam, aside from programmers, Sino pa po gumagamit ng serial motor ng Arduino ?? 😁
ReplyHi Eduard! Serial Monitor is a part of Arduino IDE. Programmers used it to make a project that helps us do our job easily. Aside from programmers, normal people can used Serial Monitor of Arduino as long as they have a knowledge to used it.
ReplyHi Mam, what is sensor value?
ReplySensor value is a variable name for the value of the potentiometer read to the analog pin of the Arduino board.
ReplyHi mam. Ano po palang transmission of data ang ginagamit kapag gumagamit ng serial monitor at arduino uno? Simplex,half duplex or full duplex?
ReplyConversionConversion EmoticonEmoticon