To download the files mentioned in this post, visit this page on the forum. http://cerebralmeltdown.com/forum/index.php?topic=325.0
1. I just re-uploaded V097_b with a quick bug fix regarding the display of GMT. I must of accidentally did a ctrl+z in there somewhere because a negative sign somehow got switched to a positive.
Anyway, if you downloaded V097_b on or before 7/04/2012, go ahead and delete that one and re-download the fixed version attached to this post.
2. I have also uploaded a version of this program that uses more accurate sun position calculations. These calculations along with the rest of the sun tracking / heliostat program take up far too much space for a normal Arduino, 53770 bytes!
They will however fit on an Arduino Mega with lots of room to spare.
The new calculations make use of the BigNumber library, which you will have to download and place in your Arduino IDE’s library folder before you can upload it to the Mega.
Here is the link http://arduino.cc/forum/index.php/topic,85692.0.html
Please note that I still need to do some testing to confirm the accuracy of these calculations, so you may want to hold off on buying one until I do that.
Also note that the Arduino Mega’s SDA and SCL pins are not in the same place as other versions of the Arduino, so you may have to rewire the RTC.
3. On one last note, I noticed another “bug” in the V09.7.b which is caused by the new EEPROM code I just added.
Basically, it seems that if you have never written to the EEPROM before, the Arduino will not be able to correctly read the alt/az values for the targets from it.
When I had this problem, I would see
Target’s Altitude: 0
Targets’s Azimuth: 0
Heliostat’s Altitude: 0
Heliostat’s Azimuth: 0
“Input exceeds machine bounds, move aborted” displayed even though the move was within machine bounds and the heliostat’s altitude and azimuth shouldn’t have been zero.
I’m not sure if this is a problem for all the Arduino boards or just the Mega, but either way the fix is easy if you encounter it.
To fix the problem, just download the EEPROM_FLOAT_FORMAT Arduino program that is attached to this post and upload it to the Arduino.
When you open up the Serial Monitor, you should see “Writing to EPPROM” displayed.
After this has been done, you can upload the Sun Tracking / Heliostat program to the Arduino and it should work as normal.
Note that you will only have to upload the EEPROM_FLOAT_FORMAT program one time.

