4

I would like to know if there is any workable way to use a single color sensor to track a light source in one axis of rotation?

Would rotating the sensor back and forth within a few degrees, every few seconds, to check differing light levels work?

callisto
  • 203
  • 1
  • 6

1 Answers1

4

Yes this is doable.

The typical use is with a robot, a lamp/light placed some distance away, with the goal being: navigate towards the light.

Assuming a robot that can spin (turn in place without moving forward or backward); mount a light sensor in a tunnel that shield the sensor from most of the light except light coming from straight forward.

Spin the robot until the light sensor sees the light (anything above 80% is reasonable).

Drive forward while the bright light is visible, when it isn't stop, spin until it is visible.

The color sensor has an ambient light setting, use that.

There are a number of line-following algorithms that can be modified to handle moving toward a point of light.

dfrevert
  • 1,331
  • 1
  • 11
  • 27