Porting Solar Tracker Arduino code to ESP8266
Posted: Fri Jul 24, 2015 1:00 am
Gabriel Miller at CerebralMeltdown.com has written an excellent program for the Arduino Mega (as well as the Uno, with less accuracy) to act as a solar tracker or heliostat. This program can control multiple machines using different types of motors, uses a real-time clock to reliably calculate the Sun's position in all weather. It can only adjust one machine at any time, however.
Item 1: The program does not compile on the latest version of the Arduino IDE (1.6.5), but works fine with IDE 1.0.6
Item 2: Gabriel's solar tracker program uses something called the "BigNumber" library in order to calculate the Sun's location to a very high degree of accuracy on the Mega. It would need to be re-written for the ESP8266 in order to achieve that same level of accuracy.
Item 3: I have a couple of small machines built, that use the Arduino Mega solar tracker. But, for the price of one Mega I can get multiple ESP boards, and I would like to replace the Mega 'brain' with one ESP8266 separately controlling each machine. So in porting to the ESP8266, a lot of the program can be cut out which deals with multiple machines, because one ESP would be only used for one tracker.
This way, I can make each machine totally portable, and in addition it could be configured to get network time updates considering that the real-time clock modules I have drift by up to a minute or more over the course of a week.
I'm not the greatest programmer, which is why I'm asking for community input, particularly in porting the BigNumber library ... I'm not very familiar with a lot of the code that it uses.
Input is welcome ... and note that this could be great for developing areas. Being in India, I would like to be able to offer a pre-built simple heliostat to local residents and perhaps even get people to invest in power generation using these. I already know people who are interested in that idea.
Item 1: The program does not compile on the latest version of the Arduino IDE (1.6.5), but works fine with IDE 1.0.6
Item 2: Gabriel's solar tracker program uses something called the "BigNumber" library in order to calculate the Sun's location to a very high degree of accuracy on the Mega. It would need to be re-written for the ESP8266 in order to achieve that same level of accuracy.
Item 3: I have a couple of small machines built, that use the Arduino Mega solar tracker. But, for the price of one Mega I can get multiple ESP boards, and I would like to replace the Mega 'brain' with one ESP8266 separately controlling each machine. So in porting to the ESP8266, a lot of the program can be cut out which deals with multiple machines, because one ESP would be only used for one tracker.
This way, I can make each machine totally portable, and in addition it could be configured to get network time updates considering that the real-time clock modules I have drift by up to a minute or more over the course of a week.
I'm not the greatest programmer, which is why I'm asking for community input, particularly in porting the BigNumber library ... I'm not very familiar with a lot of the code that it uses.
Input is welcome ... and note that this could be great for developing areas. Being in India, I would like to be able to offer a pre-built simple heliostat to local residents and perhaps even get people to invest in power generation using these. I already know people who are interested in that idea.