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?
Bricks is a question and answer site for LEGO® and building block enthusiasts. It only takes a minute to sign up.
Sign up to join this communityYes 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.