Interactive Lamp – Coding

In this project, we will make a simple construction of a lamp with two LEDs that will turn on automatically when it gets dark.

Connecting electronic modules

  • Light sensor → INPUT3.
  • Green LED → OUTPUT3.
  • Red LED → OUTPUT4.
  • Power → USB cable → computer.

The code