FarmBot / farmbot-arduino-firmware

Arduino firmware that executes g-code like commands over a serial line to move the FarmBot and operate the tool mount
MIT License
421 stars 197 forks source link

Wont compile #99

Closed kierenblack closed 6 years ago

kierenblack commented 6 years ago

It had a few issues when I first compiled. One was defining NULL and others were something about long ints? I had to change a few 0.0 to 0 to make it compile. Why was this? I managed to make a few changes and now it compiles but I cant remember what I changed.

gabrielburnworth commented 6 years ago

Do you have Mega 2560 selected as the board to compile for? What version of the Arduino IDE are you using?

kierenblack commented 6 years ago

I am using 1.8.1 and yes I have mega 2560 selected. It uploads fine once I fix the errors. I'm just wondering why I'm getting errors in the first place?

gabrielburnworth commented 6 years ago

I am using Arduino 1.8.1 and Mega 2560 and I don't get any compile errors on 3ad1d88.

You can try:

git clone -b 'v6.0.1' --single-branch  https://github.com/FarmBot/farmbot-arduino-firmware
kierenblack commented 6 years ago

Sorry, the one that wont compile is version 1.8.4.

sketch\Config.h:210:0: warning: "NULL" redefined

define NULL 0

sketch\StepperControl.h:122:40: warning: narrowing conversion of '1.0e+0' from 'double' to 'long int' inside { } [-Wnarrowing] long stepsPerMm[3] = { 1.0, 1.0, 1.0 };

gabrielburnworth commented 6 years ago

Ah, those are complier warnings, not errors. The build should still compile successfully. Do you not get Done compiling.?

kierenblack commented 6 years ago

I was a bit impatient. It does eventually upload if I wait a bit longer