Using the serial monitor to get information from the program

The SERIAL MONITOR is very useful feature of Arduino to get information in our computer from the Arduino while a program is running. Learn how it works with the following tutorial! First you have to follow the instructions given and then do the two practice problems you can read at the end of the page:

Arduino: Serial Monitor (RoboIndia)

Finally, modify your project Interactive Traffic Lights to get the following messages in the Serial Monitor depending on the situation in which the program is:

  1. “Green for cars; red for pedestrians”
  2. “Hurry up, cars; red for pedestrians”
  3. “Red for cars; green for pedestrians”
  4. “Caution, cars; hurry up, pedestrians”


Digital outputs and inputs in Arduino

Although digital outputs in Arduino don’t have secrets for us anymore, this video is a quite good reminder.

Anyway, the most important thing in the video is that it explains how to work with DIGITAL INPUTS (i.e. a push switch). That is a little bit more complicated since we need a PULL-DOWN RESISTOR. These are the connections we need:

Connections should look more or less like the following circuit diagram:

Here comes the video:

Once you understand how to work with digital inputs and a pull-down resistor, use it to create an interactive version of the traffic lights project!

Project: traffic lights

Once we know how to work with LEDs and buzzers in Arduino, we are ready to put it into practice with an almost real project. We will simulate the way traffic light work in our city. We will do it in 4 steps:

1. Create the traffic lights that control when cars can move or must stop.

2. Add two extra LEDs to control when pedestrians can walk or must wait.

3. Add an active buzzer so blind pedestrians know when they can go across the street.

4. Add a switch so we make the traffic lights interactive: they will always be green for cars and red for pedestrians unless someone presses the switch.


This chart shows how lights have to interact in each situation:

Some videos to introduce TPR to 3ºESO students

Some videos to introduce what this subject is about. I hope you enjoy them!!


(Here you have some great explanations of what’s going on in the video: These friends are electric!).

Beware of ELECTRONICS!!!

Remember: PROGRAMMING is frustrating sometimes!

ROBOTICS will make our life easier… won’t them?

Combine everything in interesting PROJECTS…

… taking SAFETY precautions not to die in a dumb way!!