So I got the Serial graphic lcd and plan on using SummoningDark’s firmware for it but i have a problem along with the library that was created for it. The problem is it won’t compile the example. The error that I keep getting is
In file included from BareMinimum.cpp:1:
C:\Program Files (x86)\arduino-1.0\libraries\GLCD/serialGLCD.h:4:22: error: WProgram.h: No such file or directory
In file included from BareMinimum.cpp:1:
C:\Program Files (x86)\arduino-1.0\libraries\GLCD/serialGLCD.h:23: error: ‘byte’ has not been declared
Now if i cant use the library for it thats fine I guess I just need to find a little documentation on how to use it without the library then.
Sounds like you’re using Arduino-1.0, which broke a few libraries. I ran into the same problem with the tinygps examples. The fix is to make your own WProgram.h file that has the single line:
#include <arduino.h>
WProgram.h should be in arduino-1.0\hardware\arduino\cores\arduino
The errors you see are from changes made to Arduino 1.0.
Look at the change notes, and google your error code and you will see.
Most folks libraries are not being updated. Theres no set ‘standard’ for the fixes yet (everything that uses Wire.h has to be changed, and thats a ton of libraries).
Actually, the fix for most libraries is pretty simple - just as dksmall said. One line and all is well. The libraries are easy to find and edit even if the error message is obscure.
However, anything using the wire library needs a number of edits. they, too, are fairly simple but more extensive (they changed the names of several functions). I surely don’t understand why they didn’t keep the old interfaces along with the new - they seem to have spent more effort in the error messages telling you how to make the changes.
The arduino guys really dropped the ball on the 1.0 upgrade. None of the changes are hard to track but pity the poor newbie who heard “Arduino is easy, it just works.” Once the libraries get updated, all will be well. By the way, a plug for PJRC - their teensyduino install fixes everything and gives you 1.0 (and 32u4) compatible libraries. I suppose you could just install their stuff but you should really buy something from them to support their efforts. I’ve got no relationship with them other than that of a happy customer that wants them to succeed.
I just tried to do this same fix on a Mac but I can’t find where the header files like arduino.h are stored. Nothing show up in spotlight. Anyone know where these files are on a Mac?
Philba:
Actually, the fix for most libraries is pretty simple - just as dksmall said. One line and all is well. The libraries are easy to find and edit even if the error message is obscure.
However, anything using the wire library needs a number of edits. they, too, are fairly simple but more extensive (they changed the names of several functions). I surely don’t understand why they didn’t keep the old interfaces along with the new - they seem to have spent more effort in the error messages telling you how to make the changes.
The arduino guys really dropped the ball on the 1.0 upgrade. None of the changes are hard to track but pity the poor newbie who heard “Arduino is easy, it just works.” Once the libraries get updated, all will be well. By the way, a plug for PJRC - their teensyduino install fixes everything and gives you 1.0 (and 32u4) compatible libraries. I suppose you could just install their stuff but you should really buy something from them to support their efforts. I’ve got no relationship with them other than that of a happy customer that wants them to succeed.
Absolutely, there is no excuse for not overloading the function name changes in the code.
It is OOP, so overloading a function name is a snap. Document it, let everyone get used to it, and modify the libs, then set a deprecated schedule.
Everything that uses wire.send and wire.receive has to change to wire.write and wire.read.
The real problem is you don’t really want to have to go an inspect someones library for all the wire functions.
Most people I see are using #define to test version and change function names and add the arduino.h header.