Integrating a timer in a photoresistor sun-tracking system.

Hello everybody. I am working on a solar panel project. We installed a photo-resistor sun-tracking system that will rotate the solar panel based on the values of the photoresistors (placed orthogonal to each other.)

I have the program set to measure the voltage output of the solar panel every one minute when the solar panel is facing the optimal direction. But when the system decides to rotate, our time-scale is technically off because as soon as the system is done rotating, it measures the voltage output of the solar panel immediately after. This creates a difference of a few seconds between two readings instead of one minute when the solar panel is facing time. I am looking to get correct, corresponding times for the voltage readings.

Thank you everybody!

btbam91:
our time-scale is technically off because as soon as the system is done rotating, it measures the voltage output of the solar panel immediately after.

Take out the code that triggers an immediate voltage check after movement.

Can you post your code?

Whenever I see someone using a tracking system based on sensors I always wonder why use a tracking device based on a sensor instead of just using the very precise available routine that will give you the location of the sun for your location based upon the time and location. Maybe it is an exercise in sensors and a two dimensional optimization but who use it for a permanent application.

Maybe I am missing something and if I am wrong can someone explain the error in my thoughts.