self automated solar tracker

I have seen 2 different methods to doing this. You can use a row of 2 or 3 photo resistors and check each one. With 3 it can move in either direction so that the middle photo resistor has the light center on it. With 2 you have it move in a single direction. Another method with just 2 sensors is on stays out in the open. Its purpose is to to be a reset for the system when the sun goes down. Thus telling the unit to return to the start position. The other one will have a tube around it. That way its only able to see direct sun light. If it is not receiving direct sunlight the unit turns to the west. The sun only tracks one way so the tracking sensor only needs to tell it to move in one direction.

As for the code i wouldn't know where to begin. But i hope i made some since there.