Check the 34 other Arduino tutorials

I think it is important that Bas on Tech can be used by everyone free of charge.

Help me ensure the future of Bas on Tech. Your donation will be used for hosting, videos and maintenance, among other things.

Thank you in advance!

#27 · LED traffic light


Tutorial goals

  • Control LED traffic light
  • Code optimization
  • Functions for more code structure

Components needed

  • 1× Arduino
  • 4× Jumper wire (male-male)
  • 4× Jumper wire (male-female)
  • 1× LED traffic light

A LED traffic light is a nice component where you can easily control three different LEDs. There is no need for additional resistors since the PCB already uses SMD resistors.

Beside explaining the circuit, I'll also explain how you can improve the structure of your code by using functions.

A challenge could be to control multiple traffic lights from a single Arduino. This way you can create your own crossing with sensors and control the traffic lights.

#27 · LED traffic light schakelschema

Bas van Dijk

About Bas on Tech


My name is Bas van Dijk, entrepreneur, software developer and maker. With Bas on Tech I share video tutorials with a wide variety of tech subjects i.e. Arduino and 3D printing.

Years ago, I bought my first Arduino with one goal: show text on an LCD as soon as possible. It took me many Google searches and digging through various resources, but I finally managed to make it work. I was over the moon by something as simple as an LCD with some text.

With Bas on Tech I want to share my knowledge so others can experience this happiness as well. I've chosen to make short, yet powerful YouTube videos with a the same structure and one subject per video. Each video is accompanied by the source code and a shopping list.