So, you’re beginning to learn hacking an Arduino board? Here’s a fun activity to do: a traffic signal light simulator. For this activity, you will need:

  • an Arduino board (I am using an Arduino Uno)
  • a breadboard
  • LED’s (1 red, 1 yellow and 1 green)
  • 220 Ohm resistors
  • some jumper cables (blue and red cables will do)

 

Attach the components to the breadboard as shown in this diagram:

I used an app called "Fritzing" to come up with this clean diagram.
I used an app called “Fritzing” to come up with this clean diagram.

Now, fire up your Arduino IDE and key-in the following code:

If everything will go as planned, you will have the LEDs lighting up in this sequence:


ABOUT THE AUTHOR

Robert “Bob” Reyes is a technologist, an ICT Consultant and Tech Speaker, a certified Google IT Support Specialist, and an Open Source advocate representing the global non-profit Mozilla (makers of Firefox) in the Philippines. Bob is a Technology Columnist for the Manila Bulletin Publishing Corporation and an aviation subject matter expert contributor for Spot.PH.

Follow The Filipino Tech Explainer on Facebook and X/Twitter.

If you liked my articles or any of the contents or if The Filipino Tech Explainer has helped you in any way, you can buy me a coffee and share your thoughts. Help me continue producing awesome articles by supporting my website. Maraming salamat po! Thank you very much!

What’s your Reaction?
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0

Leave a Reply