Sun sensor.

More than likely there is a something wrong in the circuit design, we tried breadboarding it too and it did not work, ironically the first time we did the design it did work, but it went berserk from then on.

Ahh we have solved the mystery. Can't be too tricky to check that and maybe re-write the code/use an old version that you know works.

Very much like an LDR (light dependent resistor) but more for specific wavelengths, then you could get one more towards the infa-red end of the spectrum so that if this happened to be below some clouds it should still pick up the sun in the right position rather than picking up the brightest bit of sky.

Mowcius