Arduino firmware for detecting direction of light source. Demo for CodeWeek workshop for children.
Device has servo motor with light detector (photoresistor). Servo motor is rotating and light detector is measuring light power of light source (analog value). Finally, servo motor is moved to position where light intensity is the highest.