Go Down

Topic: need help on liquid crystal library (Read 2196 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

johnwasser

Put "#include <SPI.h>" before the include of the library, just as it is in the example.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

ahjnar

i am having same problem for my project....
i had written <spi.h> but nothing worked

johnwasser


i am having same problem for my project....
i had written <spi.h> but nothing worked


Did you try the proper capitalization: <SPI.h>?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Hi,

Thanx for the help. I'm also facing the same problem. I've tried all possible caps/without caps includes, but he error persists.
I tried these one by one:
#include<spi.h>
#include<SPI.h>
#include"spi.h"
#include"SPI.h"

Here is the line of code where there is error message:

Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT, SPI_CLOCK_DIV2);

Error message: 'SPI_CLOCK_DIV2' was not declared in this scope.

Kindly help me in this regard, i'm stuck in the project i need to deliver.

regards.

johnwasser


Error message: 'SPI_CLOCK_DIV2' was not declared in this scope.


That constant should be defined by SPI.h.  Perhaps if you showed all of your code someone could figure out why the declaration is not happening.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

BijendraSingh

If you check the SPI.h 'SPI_CLOCK_DIV2' is defind there.
so it means that your library is not added Properly. follow below thread it may help you.
http://forum.arduino.cc/index.php?topic=214675.msg1571278#msg1571278
Bijendra

Go Up