Pages: [1]   Go Down
Author Topic: Librairy problem  (Read 295 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I just made a program using those librairies

Code:
#include <LiquidCrystal.h>
#include <OneWire.h>

My program was working perfectly well!

Then, I add an ethernet shield (only hardware) and it was still working well.
Then, I just add the ethernet librairies...

Code:
#include <LiquidCrystal.h>
#include <OneWire.h>
#include <Ethernet.h>

For now on, it give me this error:

C:\Users\Administrator\Desktop\arduino-1.0.2-windows\arduino-1.0.2\libraries\Ethernet\utility\w5100.cpp: In member function 'void W5100Class::init()':
C:\Users\Administrator\Desktop\arduino-1.0.2-windows\arduino-1.0.2\libraries\Ethernet\utility\w5100.cpp:28: error: 'delay' was not declared in this scope
C:\Users\Administrator\Desktop\arduino-1.0.2-windows\arduino-1.0.2\libraries\Ethernet\utility\w5100.cpp:30: error: 'SPI' was not declared in this scope
C:\Users\Administrator\Desktop\arduino-1.0.2-windows\arduino-1.0.2\libraries\Ethernet\utility\w5100.cpp: In static member function 'static uint8_t W5100Class::write(uint16_t, uint8_t)':
C:\Users\Administrator\Desktop\arduino-1.0.2-windows\arduino-1.0.2\libraries\Ethernet\utility\w5100.cpp:133: error: 'SPI' was not declared in this scope
C:\Users\Administrator\Desktop\arduino-1.0.2-windows\arduino-1.0.2\libraries\Ethernet\utility\w5100.cpp: In static member function 'static uint16_t W5100Class::write(uint16_t, const uint8_t*, uint16_t)':
C:\Users\Administrator\Desktop\arduino-1.0.2-windows\arduino-1.0.2\libraries\Ethernet\utility\w5100.cpp:146: error: 'SPI' was not declared in this scope
C:\Users\Administrator\Desktop\arduino-1.0.2-windows\arduino-1.0.2\libraries\Ethernet\utility\w5100.cpp: In static member function 'static uint8_t W5100Class::read(uint16_t)':
C:\Users\Administrator\Desktop\arduino-1.0.2-windows\arduino-1.0.2\libraries\Ethernet\utility\w5100.cpp:159: error: 'SPI' was not declared in this scope
C:\Users\Administrator\Desktop\arduino-1.0.2-windows\arduino-1.0.2\libraries\Ethernet\utility\w5100.cpp: In static member function 'static uint16_t W5100Class::read(uint16_t, uint8_t*, uint16_t)':
C:\Users\Administrator\Desktop\arduino-1.0.2-windows\arduino-1.0.2\libraries\Ethernet\utility\w5100.cpp:172: error: 'SPI' was not declared in this scope


It seem that with those 3 librairy together, something isnt working...but I don<t know what!


Ever had the same problem??


Thanks

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

well, for one thing you have libraries for hardware that both use SPI to communicate. At least I think (does liquidcrystal use SPI?)
the SPI hardware is probably being initialised twice. Can you post all of your code?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is the problem:

I wasnt using the SPI librairy...

Code:
#include <Ethernet.h>
#include <SPI.h>
#include <LiquidCrystal.h>
#include <OneWire.h>

Ethernet shield is using SPI...


How to loose an hour -_-
Logged

Pages: [1]   Go Up
Jump to: