Comments: Light-Seeking Robot
Looking for answers to technical questions?
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
If you've found an issue with this tutorial content, please send us your feedback!
Hello, I am currently trying to make this robot work and am running into trouble. To my belief I have everything put together right and I also have the code copied but the robot does not seem to sense and go towards a light source in the slightest. It searches left and right and then turns 180 degrees over and over again. Any ideas what is wrong?
Please get back to me when you can, or email me at camnagg@gmail.com Thanks, Cam
The code has analogWrite to pins 8 and 13. Those are not PWM pins on the RedBoard. I wanted to slow the motors down to stop them from slipping on the wood floor. This didn't work until I moved pin 8 to pin 3 and pin 13 to pin 5. Then I could slow the motors.
Wow, good catch! I'm not sure how I managed to do that...the hardware shows the PWM pins using pins 8 and 13, too. I'll go back and fix these as soon as I get a chance.
anyway you could help me with an issue?
Is there a way to use this a a solar panel sun tracker in rotation on a pole support. And possibly azimuth as well?
I don't see why not! You'd have to change a good bit of the code, though, as you'd probably want to use servos/stepper motors instead of the DC motors.