Robot Head – Turning to the Light

Do you know how solar panels turn to the sun? Thanks to this knowledge, solar power plants operate at full power! This short program will teach our robot how to do the same.

Connecting electronic modules

  • Distance sensor → port Distance.
  • Light sensor → INPUT1.
  • Light sensor → INPUT2.
  • Power supply → USB cable → computer.

The code