Serial Monitor (Arduino)

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:  
 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 }

_____________________________________________________________

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.
Previous
Next Post »

31 comments

Write comments
Unknown
AUTHOR
July 26, 2016 at 10:46 PM delete

Mam Daisy, what will happen if there is no Serial Monitor in Arduino? :)

Reply
avatar
Unknown
AUTHOR
July 26, 2016 at 11:11 PM delete

The 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.

Reply
avatar
Unknown
AUTHOR
July 26, 2016 at 11:39 PM delete

Now i know :) Thank you Maam Daisy **

Reply
avatar
July 27, 2016 at 12:06 AM delete

Hi! Is it possible to see Graphic display on the Serial Monitor of Arduino?

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 4:49 PM delete

Ma'am Daisy, what other feature I can use other than Serial Monitor?

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 5:14 PM delete

The 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.

If 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

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 5:15 PM delete

Okay ma'am. Thank you

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 5:35 PM delete

What is meant by serial data?

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 6:22 PM delete

Serial 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.

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 6:22 PM delete

Since I am not familiar with this. What arduino serial monitor can contribute to society?

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 6:34 PM delete

The 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.

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 7:14 PM delete

maam, 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.



/*

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 }

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 7:16 PM delete

Hi ma'am what is the function of serial monitor?

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 7:27 PM delete

Maybe 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.

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 7:30 PM delete

Hi 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.

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 7:32 PM delete

Welcome Marco! Do you have another question regarding to Serial Monitor?

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 7:33 PM delete

Welcome Rica! Do you have another question regarding to Serial Monitor?

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 7:34 PM delete

Welcome CK! Do you have another question regarding to Serial Monitor?

Reply
avatar
Unknown
AUTHOR
July 27, 2016 at 7:58 PM delete

Hi! 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.

Reply
avatar
Unknown
AUTHOR
July 31, 2016 at 3:41 AM delete

Hi pano po bumababa yung brightness nung sa LED? Pgkakaintindi ko kase 5V tas 0v, salitan ng mabilisan ung nangyyari.

Reply
avatar
Unknown
AUTHOR
July 31, 2016 at 9:32 PM delete

Hi 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.

Reply
avatar
Unknown
AUTHOR
July 31, 2016 at 10:19 PM delete

Hi ma'am Daisy, why we should always place void loop() in the sketch even if we are not putting anything on it?

Reply
avatar
Unknown
AUTHOR
July 31, 2016 at 10:22 PM delete

Hi 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.

Reply
avatar
Arczed
AUTHOR
August 1, 2016 at 5:39 PM delete

can we use other kind of switch like rotary switch aside from potentiometer?

Reply
avatar
Unknown
AUTHOR
August 1, 2016 at 5:51 PM delete

Hi 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.

Reply
avatar
Unknown
AUTHOR
August 2, 2016 at 7:13 AM delete

mam, aside from programmers, Sino pa po gumagamit ng serial motor ng Arduino ?? 😁

Reply
avatar
Unknown
AUTHOR
August 2, 2016 at 9:35 PM delete

Hi 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.

Reply
avatar
Unknown
AUTHOR
August 2, 2016 at 10:50 PM delete

Hi Mam, what is sensor value?

Reply
avatar
Unknown
AUTHOR
August 2, 2016 at 11:28 PM delete

Sensor value is a variable name for the value of the potentiometer read to the analog pin of the Arduino board.

Reply
avatar
August 6, 2016 at 1:08 AM delete

Hi mam. Ano po palang transmission of data ang ginagamit kapag gumagamit ng serial monitor at arduino uno? Simplex,half duplex or full duplex?

Reply
avatar

“Sadyang mailap ang humanap ng tunay na pag-ibig. Madaling sabihing mahal kita, madaling isiping mahal ka niya, pero paano mo malalamang... ito na, eto na talaga?”

Ramon Bautista, Bakit Hindi Ka Crush ng Crush Mo?