Archive

Archive for the ‘Arduino’ Category

getting the SPI LCD Module from DFRobot to work under Arduino 1.0

January 20th, 2012 No comments

I bought myself this little gem from komputer.de but was, as many others, puzzled by the errors compiling the LCD12864RSPI example.

D:\dev\arduino-1.0\libraries\LCD12864RSPI\LCD12864RSPI.cpp:10:21: error: wiring.h: No such file or directory
D:\dev\arduino-1.0\libraries\LCD12864RSPI\LCD12864RSPI.cpp: In member function ‘void LCD12864RSPI::delayns()’:
D:\dev\arduino-1.0\libraries\LCD12864RSPI\LCD12864RSPI.cpp:28: error: ‘delayMicroseconds’ was not declared in this scope
D:\dev\arduino-1.0\libraries\LCD12864RSPI\LCD12864RSPI.cpp: In member function ‘void LCD12864RSPI::WriteByte(int)’:
D:\dev\arduino-1.0\libraries\LCD12864RSPI\LCD12864RSPI.cpp:34: error: ‘HIGH’ was not declared in this scope

Looking into the changelog revealed that all the fundamental definitions of the Arduino enviroment (like HIGH/LOW constants or functions like ‘delayMicroseconds’) are put into a new file called ‘arduino.h’. This file had a different name in earlier revisions.

The solution is simple : navigate to the ‘\arduino-1.0\libraries\LCD12864RSPI‘  folder and replace from ‘LCD12864RSPI.h‘ the inclusion of ‘#include <wiring.h>‘ with  ‘#include <arduino.h>‘ and you’re set.

Categories: Arduino Tags: