|
Re: Light Sensors
What you need to do is buy two light sensors. You put one on the right, one on the left. This enables you to see which value is greater and turn towards that side. Once you have turned to that side and the light is bright enough, which you can do with a simple if statement if a variable with the analog light input is > a number of your choice you drive forward.
If you only have one, you must turn until you have a light input > a numbe rof your choice and then drive forward.
|