Go Down

Topic: Librairy problem (Read 391 times) previous topic - next topic

johnyboy

Hi,

I just made a program using those librairies

Code: [Select]

#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: [Select]

#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


eriknyquist

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?

johnyboy

Here is the problem:

I wasnt using the SPI librairy...

Code: [Select]

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


Ethernet shield is using SPI...


How to loose an hour -_-

Go Up