Go Down

Topic: need help on liquid crystal library (Read 873 times) previous topic - next topic

sushant

hello everyone,
i'm getting following errors while compiling the codes for my controller:

C:\Users\admin\Downloads\arduino-1.0.1-windows (2)\arduino-1.0.1\libraries\LiquidCrystal\LiquidCrystal.cpp: In member function 'void LiquidCrystal::initSPI(uint8_t)':
C:\Users\admin\Downloads\arduino-1.0.1-windows (2)\arduino-1.0.1\libraries\LiquidCrystal\LiquidCrystal.cpp:117: error: 'SPI' was not declared in this scope
C:\Users\admin\Downloads\arduino-1.0.1-windows (2)\arduino-1.0.1\libraries\LiquidCrystal\LiquidCrystal.cpp:120: error: 'SPI_CLOCK_DIV2' was not declared in this scope
C:\Users\admin\Downloads\arduino-1.0.1-windows (2)\arduino-1.0.1\libraries\LiquidCrystal\LiquidCrystal.cpp:124: error: 'SPI_MODE0' was not declared in this scope
C:\Users\admin\Downloads\arduino-1.0.1-windows (2)\arduino-1.0.1\libraries\LiquidCrystal\LiquidCrystal.cpp: In member function 'void LiquidCrystal::spiSendOut()':
C:\Users\admin\Downloads\arduino-1.0.1-windows (2)\arduino-1.0.1\libraries\LiquidCrystal\LiquidCrystal.cpp:403: error: 'SPI' was not declared in this scope

the liquid crystal.h was downloaded from http://arduino.cc/playground/Main/LiquidCrystal

N.B: i guess i posted this in the wrong section (installation and trouble shooting) so i request the mods to remove the topic from that section

marco_c

From memory you get those errors when you have not included wire.h in the program file.
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

pluggy

All recent versions (from about 0014 onwards if memory serves) have the liquid crystal library as standard.  Its very likely its an old library that hasn't been updated to work with the newer versions of the IDE. Do you need the extra functionality ? (the shift register bit), if not, I'd just use the built in one.
http://pluggy.is-a-geek.com/index.html

sushant

reinstalling the IDE helped. now i'm left with these errors:

C:\Users\admin\Downloads\arduino-1.0.1-windows\arduino-1.0.1\libraries\OneWire\OneWire.cpp:480: error: prototype for 'short unsigned int OneWire::crc16(short unsigned int*, short unsigned int)' does not match any in class 'OneWire'
C:\Users\admin\Downloads\arduino-1.0.1-windows\arduino-1.0.1\libraries\OneWire\/OneWire.h:187: error: candidate is: static uint16_t OneWire::crc16(uint8_t*, uint16_t)

but can't find a way out. please help.

Go Up