Hello! I am trying to update the firmware on my makergear M2 3D printer and I keep getting this error when I try and compile the file. I don't know much about coding at all and I haven't been able to solve the problem reading related posts. I have attached the entire folder that includes all the necessary h files.
I would re-download and open marlin, and copy all your settings into it. I bet while you were putting in info, you at some point accidently hit delte or backspace or A or any other random key. if you are new at this it might be easier than acutally finding the offending character.
or you can use a "diff" tool and compare it to the default version of the file. google it, a diff tool just compares two text files and tells you the differences. you will see all your edits, intentional or accidental! good luck!
I tried adding the line you suggested and I am still getting the same error. I am using 1.0.4 and I uploaded sanguino folders into the arduino hardware and have selected sanguino W ATmega644P
Did you also get this? (which I did when selecting Sanguino):
In file included from Marlin.h:26,
from cardreader.cpp:1:
pins.h:1118:2: error: #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
In file included from cardreader.cpp:1:
Marlin.h:30:26: error: WProgram.h: No such file or directory
Yes, sorry I didn't notice the other errors before. Here are all the errors I got:
In file included from /Marlin.h:26,
from cardreader.cpp:1:
/pins.h:1118:2: error: #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
In file included from cardreader.cpp:1:
/Marlin.h:30:26: error: WProgram.h: No such file or directory
In file included from /Marlin.h:38,
from cardreader.cpp:1:
MarlinSerial.h:116: error: expected ',' or '...' before '&' token
MarlinSerial.h:116: error: ISO C++ forbids declaration of 'String' with no type
MarlinSerial.h:135: error: expected ',' or '...' before '&' token
MarlinSerial.h:135: error: ISO C++ forbids declaration of 'String' with no type
/MarlinSerial.h: In member function 'void MarlinSerial::print(int)':
MarlinSerial.h:118: error: 's' was not declared in this scope
In file included from cardreader.cpp:1:
/Marlin.h: At global scope:
Marlin.h:106: error: variable or field 'manage_inactivity' declared void
Marlin.h:106: error: 'byte' was not declared in this scope
cardreader.cpp: In constructor 'CardReader::CardReader()':
cardreader.cpp:29: error: 'millis' was not declared in this scope
cardreader.cpp: In member function 'void CardReader::checkautostart(bool)':
cardreader.cpp:419: error: 'millis' was not declared in this scope
I just discovered I won't need to update the firmware, so I might not need to worry about the errors. Thank you for all of your help!