Pages: [1]   Go Down
Author Topic: EthernetShield WebServer compile errors  (Read 2810 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have the arduino uno r3 connected with the ethernet shield. When I try to compile the example WebServer project (or any project from the Ethernet examples) I'm getting SPI compile errors.

On this board is also an SD card interface present, and the SD example is compiling (and running) just fine. I just can't get to get the Ethernet examples to work. I have tried copying the library to the sketchbook folder, but no luck.

I'm using ARDUINO 1.0.1 - 2012.05.21 on ubuntu.

Is there something missing?

/home/marek/sketchbook/libraries/Ethernet/utility/w5100.cpp: In member function ‘void W5100Class::init()’:
/home/marek/sketchbook/libraries/Ethernet/utility/w5100.cpp:28: error: ‘delay’ was not declared in this scope
/home/marek/sketchbook/libraries/Ethernet/utility/w5100.cpp:30: error: ‘SPI’ was not declared in this scope
/home/marek/sketchbook/libraries/Ethernet/utility/w5100.cpp: In static member function ‘static uint8_t W5100Class::write(uint16_t, uint8_t)’:
/home/marek/sketchbook/libraries/Ethernet/utility/w5100.cpp:133: error: ‘SPI’ was not declared in this scope
/home/marek/sketchbook/libraries/Ethernet/utility/w5100.cpp: In static member function ‘static uint16_t W5100Class::write(uint16_t, const uint8_t*, uint16_t)’:
/home/marek/sketchbook/libraries/Ethernet/utility/w5100.cpp:146: error: ‘SPI’ was not declared in this scope
/home/marek/sketchbook/libraries/Ethernet/utility/w5100.cpp: In static member function ‘static uint8_t W5100Class::read(uint16_t)’:
/home/marek/sketchbook/libraries/Ethernet/utility/w5100.cpp:159: error: ‘SPI’ was not declared in this scope
/home/marek/sketchbook/libraries/Ethernet/utility/w5100.cpp: In static member function ‘static uint16_t W5100Class::read(uint16_t, uint8_t*, uint16_t)’:
/home/marek/sketchbook/libraries/Ethernet/utility/w5100.cpp:172: error: ‘SPI’ was not declared in this scope
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 146
Posts: 6019
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you include the SPI.h file?
Code:
#include <SPI.h>
#include <Ethernet.h>
// rest of your code
Logged

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

Yes, the spi.h file is included. I haven't touched the example code.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 146
Posts: 6019
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using Ubuntu 11.10, and I do not get those errors. Did you download and install the Arduino IDE from the Ubuntu repository first? It is v0022, but has all the avr-gcc and avr-libc updates.

edit: Install IDE v0022 from the Ubuntu Software Center in your launcher.
« Last Edit: May 31, 2012, 06:28:51 am by SurferTim » Logged

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

That fixed the problem. Thank you.  smiley-grin

Time for real fun!
Logged

Pages: [1]   Go Up
Jump to: