sun tracker (heliostat)

Hi. i found a code online for my project that i am doing. I don't have much knowledge in coding. The documentation is here: https://www.cerebralmeltdown.com/arduino-sun-tracking-heliostat-program-download-page/

How much would you charge me for the solution?

When i try to upload, this error comes up:

Arduino: 1.0.6 (Windows NT (unknown)), Board: "Arduino Mega 2560 or Mega ADK"
Mega_Sun_Harvester_Program_V01:70: error: 'BigNumber' does not name a type
Mega_Sun_Harvester_Program_V01:71: error: 'BigNumber' does not name a type
Mega_Sun_Harvester_Program_V01:72: error: 'BigNumber' does not name a type
Mega_Sun_Harvester_Program_V01:73: error: 'BigNumber' does not name a type
Mega_Sun_Harvester_Program_V01:74: error: 'BigNumber' does not name a type
Mega_Sun_Harvester_Program_V01:75: error: 'BigNumber' does not name a type
Mega_Sun_Harvester_Program_V01:76: error: 'BigNumber' does not name a type
Mega_Sun_Harvester_Program_V01:77: error: 'BigNumber' does not name a type
Mega_Sun_Harvester_Program_V01:78: error: 'BigNumber' does not name a type
Mega_Sun_Harvester_Program_V01:79: error: 'BigNumber' does not name a type
Mega_Sun_Harvester_Program_V01:80: error: 'BigNumber' does not name a type
Mega_Sun_Harvester_Program_V01:81: error: 'BigNumber' has not been declared
Mega_Sun_Harvester_Program_V01:81: error: 'BigNumber' has not been declared
Mega_Sun_Harvester_Program_V01:82: error: 'BigNumber' has not been declared
Mega_Sun_Harvester_Program_V01:82: error: 'BigNumber' has not been declared
Mega_Sun_Harvester_Program_V01:83: error: 'BigNumber' does not name a type
Mega_Sun_Harvester_Program_V01:84: error: 'BigNumber' was not declared in this scope
Mega_Sun_Harvester_Program_V01:85: error: 'BigNumber' was not declared in this scope
Mega_Sun_Harvester_Program_V01:86: error: variable or field 'printBignum' declared void
Mega_Sun_Harvester_Program_V01:86: error: 'BigNumber' was not declared in this scope
Mega_Sun_Harvester_Program_V01:86: error: 'n' was not declared in this scope
SunCalculations.ino: In function 'void findSunsAltAndAzOne(int, int, int, int, int, int, int, float, float)':
SunCalculations:4: error: 'BigNumberMath' has not been declared
SunCalculations:6: error: 'BigNumber' was not declared in this scope
SunCalculations:6: error: expected ;' before 'jd' SunCalculations:9: error: expected ;' before 't'
SunCalculations:12: error: expected ;' before 'l' SunCalculations:15: error: expected ;' before 'm'
SunCalculations:18: error: expected ;' before 'c' SunCalculations:21: error: expected ;' before 'o'
SunCalculations:24: error: expected ;' before 'lambda' SunCalculations:27: error: expected ;' before 'epsilon'
SunCalculations:30: error: expected ;' before 'delta' SunCalculations:33: error: expected ;' before 'alpha'
SunCalculations:36: error: expected ;' before 'theta' SunCalculations:39: error: expected ;' before 'h'
SunCalculations:45: error: 'BigNumberMath' has not been declared
SunCalculations.ino: At global scope:

it is longer but can't fit in here!

Please post a link you downloaded the program from. I didn't see one named Mega_Sun_Harvester_Program_V01 on that page

Here is the file

V.0.98 gives me almost the same thing.

Mega_Sun_Harvester_Program_V01.zip (54.4 KB)

You forgot to do this part of the installation instructions:
https://www.cerebralmeltdown.com/arduino-sun-tracking-heliostat-program-download-page/

Install Libraries

Inside both of the above programs, you will find a folder named “libraries.” Make sure all of the folders inside this folder are installed in the Arduino IDE’s library folder before trying to upload either of the programs to the Arduino. The upload will fail if they are not installed.

Remember that you can find information on installing libraries at the “Getting Started with Arduino” link.

That will solve your error. However, that is actually not the recommended way to install libraries. You should never install anything to the Arduino IDE installation folder. The reason is that when you update to a new version of the Arduino IDE everything you installed to that location will be lost. Instead, you should install libraries to the libraries subfolder of your sketchbook. The location of the sketchbook is found at File > Preferences > Sketchbook location. The Arduino IDE even offers a very easy way to install libraries to the correct location:

  • Sketch > Import Library... > Add Library...
  • Select the Mega_Sun_Harvester_Program_V01/libraries/BigNumber folder
  • Click "Open"
  • Repeat the process with Mega_Sun_Harvester_Program_V01/libraries/BigNumberMath

Hi. Ooh do i feel dumb now. I knew there would be something i missed.
Thanks a lot.

Just an FYI: When I was first testing this, I forgot that it said to use Arduino IDE 1.0.6 and used the latest Arduino IDE 1.8.7 instead. It compiled with no problems. In fact, Arduino IDE 1.8.7 would have given you the much more helpful "No such file or directory" error instead of all that "Does not name a type" stuff. Since I don't have the hardware, I can't say whether the code actually works on 1.8.7, but usually code that's not compatible with the new IDE versions simply doesn't compile rather than compiling but then not working correctly.

It might make sense to stick with the recommended IDE version but if you're going to be doing a lot of work with this code it also might be worth trying out the modern IDE since there have been a lot of improvements made in the years since the 1.0.6 release.