Hey Looking for a bit of help

Guys I’m working on a school project. I’m looking to track the sun with a parabolic mirror. The Tracking system consist of two light dependent sensors, Arduino Uno, motor drive, two limit switches. My problem is that I am getting the mirror to rotate, but not stop when the sensors are at a 90 degree angle underneath the light source. If you have an ideal on how to program the broad to complete the task, the help will be appreciated. If you would like to see the code, we can work on it together.

Hi, welcome to the forum.

Could you make a drawing of the sensors and the 90 degrees ? You can make a photo of that and attach it. When you use the "REPLY" button, there is an attach option at the lower-left of the text input field.

midnitenj: If you would like to see the code, we can work on it together.

I would like to see the code posted here. Perhaps it is a simple coding mistake.

Post a picture of your LDR setup. AFAIK, tracking is usually done with two LDRs with a vane in between. The vane casts a shadow over one LDR when not 90 degrees with the light source. You need another set of two LDRs if you also want to track the vertical plane. I would connect each LDR to it's own analogue-in port with a pull-up resistor (>= 10K). Than it's simply a matter of comparing their digital values in software. Leo..