Pages: [1]   Go Down
Author Topic: need help on liquid crystal library  (Read 1878 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8966
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Put "#include <SPI.h>" before the include of the library, just as it is in the example.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8966
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Did you try the proper capitalization: <SPI.h>?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8966
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Mumbai
Offline Offline
Full Member
***
Karma: 4
Posts: 133
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Bijendra

Pages: [1]   Go Up
Jump to: