Interactive Lamp – Advanced Coding

In this project, we are going to make an advanced version of the basic interactive lamp. This version of the interactive lamp will turn on and off fluently.

Connecting electronic modules

  • Distance sensor → port Distance.
  • LED → OUTPUT3.
  • LED → OUTPUT4 (optional).
  • Power → USB cable → computer.

The Code