der_tom
11.03.2012, 15:34
hallo mein sketch megert immer beim hochladen über folgende zeile
#include <SPI.h>
#include <Ethernet.h>
// ethernet configuration
byte mac[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
byte ip[] = { 192, 168, 0, 33 }; // P1 --> { 10, 1, 1, 5 };
Server server(3); // port 80 is default for HTTP
// initial
int LED = 3; // led is connected to digital pin 3
int PIR = 2; // PIR sensor is connected to digital pin 2
int LDR = 5; // LDR sensor is connected to analog in 5
int PIRstate = 0; // variable for PIR sensor status
float photocell = 0; // variable for photocell (LDR) analog value
char c = 0; // received data
char command[2] = "\0"; // command
sketch_mar11a:6: error: no matching function for call to 'Server::Server(int)'
As of Arduino 1.0, the Server class in the Ethernet library has been renamed to EthernetServer.
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Server.h:4: note: candidates are: Server::Server()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Server.h:4: note: Server::Server(const Server&)
sketch_mar11a:6: error: cannot declare variable 'server' to be of abstract type 'Server'
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Server.h:4: note: because the following virtual functions are pure within 'Server':
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: note: virtual size_t Print::write(uint8_t)
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Server.h:6: note: virtual void Server::begin()
sketch_mar11a.cpp: In function 'void loop()':
sketch_mar11a:29: error: 'class Server' has no member named 'available'
sketch_mar11a:29: error: cannot declare variable 'client' to be of abstract type 'Client'
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:7: note: because the following virtual functions are pure within 'Client':
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:12: note: virtual size_t Client::write(uint8_t)
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:13: note: virtual size_t Client::write(const uint8_t*, size_t)
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:14: note: virtual int Client::available()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:15: note: virtual int Client::read()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:17: note: virtual int Client::peek()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:18: note: virtual void Client::flush()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:10: note: virtual int Client::connect(IPAddress, uint16_t)
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:11: note: virtual int Client::connect(const char*, uint16_t)
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:16: note: virtual int Client::read(uint8_t*, size_t)
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:19: note: virtual void Client::stop()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:20: note: virtual uint8_t Client::connected()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:21: note: virtual Client::operator bool()
kann mir da jemand helfen
#include <SPI.h>
#include <Ethernet.h>
// ethernet configuration
byte mac[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
byte ip[] = { 192, 168, 0, 33 }; // P1 --> { 10, 1, 1, 5 };
Server server(3); // port 80 is default for HTTP
// initial
int LED = 3; // led is connected to digital pin 3
int PIR = 2; // PIR sensor is connected to digital pin 2
int LDR = 5; // LDR sensor is connected to analog in 5
int PIRstate = 0; // variable for PIR sensor status
float photocell = 0; // variable for photocell (LDR) analog value
char c = 0; // received data
char command[2] = "\0"; // command
sketch_mar11a:6: error: no matching function for call to 'Server::Server(int)'
As of Arduino 1.0, the Server class in the Ethernet library has been renamed to EthernetServer.
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Server.h:4: note: candidates are: Server::Server()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Server.h:4: note: Server::Server(const Server&)
sketch_mar11a:6: error: cannot declare variable 'server' to be of abstract type 'Server'
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Server.h:4: note: because the following virtual functions are pure within 'Server':
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: note: virtual size_t Print::write(uint8_t)
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Server.h:6: note: virtual void Server::begin()
sketch_mar11a.cpp: In function 'void loop()':
sketch_mar11a:29: error: 'class Server' has no member named 'available'
sketch_mar11a:29: error: cannot declare variable 'client' to be of abstract type 'Client'
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:7: note: because the following virtual functions are pure within 'Client':
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:12: note: virtual size_t Client::write(uint8_t)
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:13: note: virtual size_t Client::write(const uint8_t*, size_t)
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:14: note: virtual int Client::available()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:15: note: virtual int Client::read()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:17: note: virtual int Client::peek()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:18: note: virtual void Client::flush()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:10: note: virtual int Client::connect(IPAddress, uint16_t)
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:11: note: virtual int Client::connect(const char*, uint16_t)
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:16: note: virtual int Client::read(uint8_t*, size_t)
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:19: note: virtual void Client::stop()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:20: note: virtual uint8_t Client::connected()
D:\Programming\Programme\arduino-1.0-windows\arduino-1.0\hardware\arduino\cores\arduino/Client.h:21: note: virtual Client::operator bool()
kann mir da jemand helfen