Estou tentando compilar um codigo exemplo de webserver

so que sempre da esse erro


/usr/share/arduino/libraries/Ethernet/Ethernet.cpp: In member function ‘void EthernetClass::begin(uint8_t*, IPAddress, IPAddress, IPAddress, IPAddress)’:
/usr/share/arduino/libraries/Ethernet/Ethernet.cpp:63:39: error: no matching function for call to ‘W5100Class::setIPAddress(IPAddress::<anonymous union>&)’
/usr/share/arduino/libraries/Ethernet/Ethernet.cpp:63:39: note: candidate is:
In file included from /usr/share/arduino/libraries/Ethernet/Ethernet.cpp:1:0:
/usr/share/arduino/libraries/Ethernet/utility/w5100.h:385:6: note: void W5100Class::setIPAddress(uint8_t*)
/usr/share/arduino/libraries/Ethernet/utility/w5100.h:385:6: note: no known conversion for argument 1 from ‘IPAddress::<anonymous union>’ to ‘uint8_t* {aka unsigned char*}’
/usr/share/arduino/libraries/Ethernet/Ethernet.cpp:64:38: error: no matching function for call to ‘W5100Class::setGatewayIp(IPAddress::<anonymous union>&)’
/usr/share/arduino/libraries/Ethernet/Ethernet.cpp:64:38: note: candidate is:
In file included from /usr/share/arduino/libraries/Ethernet/Ethernet.cpp:1:0:
/usr/share/arduino/libraries/Ethernet/utility/w5100.h:361:6: note: void W5100Class::setGatewayIp(uint8_t*)
/usr/share/arduino/libraries/Ethernet/utility/w5100.h:361:6: note: no known conversion for argument 1 from ‘IPAddress::<anonymous union>’ to ‘uint8_t* {aka unsigned char*}’
/usr/share/arduino/libraries/Ethernet/Ethernet.cpp:65:38: error: no matching function for call to ‘W5100Class::setSubnetMask(IPAddress::<anonymous union>&)’
/usr/share/arduino/libraries/Ethernet/Ethernet.cpp:65:38: note: candidate is:
In file included from /usr/share/arduino/libraries/Ethernet/Ethernet.cpp:1:0:
/usr/share/arduino/libraries/Ethernet/utility/w5100.h:369:6: note: void W5100Class::setSubnetMask(uint8_t*)
/usr/share/arduino/libraries/Ethernet/utility/w5100.h:369:6: note: no known conversion for argument 1 from ‘IPAddress::<anonymous union>’ to ‘uint8_t* {aka unsigned char*}’

O que pode ser?

Exibições: 648

Responder esta

Respostas a este tópico

Poste o código

Seria qualquer codigo exemplo como esse

/*
Web Server

A simple web server that shows the value of the analog input pins.
using an Arduino Wiznet Ethernet shield.

Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
* Analog inputs attached to pins A0 through A5 (optional)

created 18 Dec 2009
by David A. Mellis
modified 4 Sep 2010
by Tom Igoe

*/

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

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {0x04, 0xfe, 0x31, 0x34, 0x09, 0xfa};
IPAddress ip(192,168,1, 177);

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);

void setup()
{
// start the Ethernet connection and the server:
Ethernet.begin(mac, ip);
server.begin();
}

void loop()
{
// listen for incoming clients
EthernetClient client = server.available();
if (client) {
// an http request ends with a blank line
boolean currentLineIsBlank = true;
while (client.connected()) {
if (client.available()) {
char c = client.read();
// if you've gotten to the end of the line (received a newline
// character) and the line is blank, the http request has ended,
// so you can send a reply
if (c == '\n' && currentLineIsBlank) {
// send a standard http response header
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println();

// output the value of each analog input pin
for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
client.print("analog input ");
client.print(analogChannel);
client.print(" is ");
client.print(analogRead(analogChannel));
client.println("<br />");
}
break;
}
if (c == '\n') {
// you're starting a new line
currentLineIsBlank = true;
}
else if (c != '\r') {
// you've gotten a character on the current line
currentLineIsBlank = false;
}
}
}
// give the web browser time to receive the data
delay(1);
// close the connection:
client.stop();
}
}

ps: estou usando linux

Qual ethernet shield esta usando?

É compativel com o código que esta testando?

Esse problema em cima ja foi solucionado, era biblioteca velha,

Agora to precisando de ajuda quanto a pinagem do enc28j60 no arduino atemega1280

Achei uma sequencia de pinagem mais não esta funcionando, agora não sei se é a sequencia que não funciona ou se é problema de compatibilidade com a biblioteca

Pesquisando aqui, tentei usar esse tutorial

http://www.incrediblediy.com/2013/03/arduino-based-webserver-atmega...

Tentei adaptar pq o meu é o atmega1280, baixe a biblioteca q ele fa
la, so que como ele não disponibiliza eu procurei na internet hehe, so que na hora de pinga da host inacessivel 

RSS

© 2024   Criado por Marcelo Rodrigues.   Ativado por

Badges  |  Relatar um incidente  |  Termos de serviço