WEB SERVER - errori

Ciao a tutti,
devo fare un web server che riceve dati da un tmp36 per temperatura e visualizza una pagina html se interrogato da web, il mio problema è che sono alle prime armi e provando a capire i codici sul sito officiali cado in errori che non riesco a risolvere e capire.
Il codice che mi riferisco è questo:

/*
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[] = { 0×00, 0×25, 0×22, 0×20, 0xee, 0×99 };
byte mac[] = { 0×90, 0xA2, 0xDA, 0×00, 0×23, 0x5D };
byte ip[] = { 192,168,125, 177 };


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


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


void loop()
{
// listen for incoming clients
Client 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();
    client.println(“<html>”);
   client.print(“<head><meta http-equiv=\”refresh\” content=\”1\”></head>”);
    client.println(“<body>”);
    client.println(“Arduino says:”);


   // 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(“
”);
    }
    client.println(“</body></html>”);
    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();
}
}

trovato sul sito, compilandolo mi da i seguenti errori:

Arduino:1.6.5 (Windows 7), Scheda:"Arduino Uno"

try:30: error: expected '}' before 'u00d790'
try:30: error: expected ',' or ';' before 'u00d790'
try:30: error: expected declaration before '}' token
stray '\' in program






















try:30: error: stray '\' in program
try:30: error: stray '\' in program
try:30: error: stray '\' in program
try:61: error: stray '\' in program
try:61: error: stray '\' in program
try:61: error: stray '\' in program
try:63: error: stray '\' in program
try:63: error: stray '\' in program
try:64: error: stray '\' in program
try:64: error: stray '\' in program
try:66: error: stray '\' in program
try:66: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:68: error: stray '\' in program
try:68: error: stray '\' in program
try:69: error: stray '\' in program
try:69: error: stray '\' in program
try:74: error: stray '\' in program
try:74: error: stray '\' in program
try:76: error: stray '\' in program
try:76: error: stray '\' in program
try:78: error: stray '\' in program
try:78: error: stray '\' in program
try:80: error: stray '\' in program
try:80: error: stray '\' in program
try:30: error: expected '}' before 'u00d790'
try:30: error: expected ',' or ';' before 'u00d790'
try:30: error: expected declaration before '}' token
stray '\' in program


try:30: error: stray '\' in program
try:30: error: stray '\' in program
try:30: error: stray '\' in program
try:61: error: stray '\' in program
try:61: error: stray '\' in program
try:61: error: stray '\' in program
try:63: error: stray '\' in program
try:63: error: stray '\' in program
try:64: error: stray '\' in program
try:64: error: stray '\' in program
try:66: error: stray '\' in program
try:66: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:67: error: stray '\' in program
try:68: error: stray '\' in program
try:68: error: stray '\' in program
try:69: error: stray '\' in program
try:69: error: stray '\' in program
try:74: error: stray '\' in program
try:74: error: stray '\' in program
try:76: error: stray '\' in program
try:76: error: stray '\' in program
try:78: error: stray '\' in program
try:78: error: stray '\' in program
try:80: error: stray '\' in program
try:80: error: stray '\' in program
try:30: error: expected '}' before 'u00d790'
try:30: error: expected ',' or ';' before 'u00d790'
try:30: error: expected declaration before '}' token
stray '\' in program

 Questo report potrebbe essere più ricco
di informazioni con
 "Mostra un output dettagliato durante la compilazione"
 abilitato in "File > Impostazioni"

come posso risolverli?
grazie in anticipo

byte mac[] = { 0×90, 0xA2, 0xDA, 0×00, 0×23, 0x5D };

× is not the same as x

And to be clear, x is correct. × is wrong.

Fix that, and see if it compiles. That may fix it.

There may also be problem with your escaping or a " in the wrong place messing everything up, but I don't see the problem at first glance.

It's in unicode. Paste into Notepad, or similar text editor, then paste into the IDE.

dannable:
It's in unicode. Paste into Notepad, or similar text editor, then paste into the IDE.

That won't remove the unicode characters. Notepad supports Unicode (albeit badly, Bush hid the facts - Wikipedia)

Grazie a tutti, mi scuso ho modificato gli errori che mi dava ed ora mi da altri problemi strani :frowning:

/*
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[] = { 0×00, 0×25, 0×22, 0×20, 0xee, 0×99 };
byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x23, 0x5D };
byte ip[] = { 192,168,125, 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
Client 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();
client.println('');
client.print('');
client.println('');
client.println('Arduino says:');

// 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('
');
}
client.println('');
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();
}
}

errore:

Arduino:1.6.5 (Windows 7), Scheda:"Arduino Uno"

Uso la libreria SPI nella cartella: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI

Uso la libreria Ethernet nella cartella: C:\Program Files (x86)\Arduino\libraries\Ethernet

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\libraries\Ethernet\src C:\Users\utente\AppData\Local\Temp\build3294253615119464232.tmp\try.cpp -o C:\Users\utente\AppData\Local\Temp\build3294253615119464232.tmp\try.cpp.o

try.ino: In function 'void loop()':
try.ino:51:35: error: cannot allocate an object of abstract type 'Client'
In file included from C:\Program Files (x86)\Arduino\libraries\Ethernet\src/EthernetClient.h:5:0,
from C:\Program Files (x86)\Arduino\libraries\Ethernet\src/Ethernet.h:7,
from try.ino:24:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:26:7: note: because the following virtual functions are pure within 'Client':
class Client : public Stream {
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:31:18: note: virtual size_t Client::write(uint8_t)
virtual size_t write(uint8_t) =0;
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:32:18: note: virtual size_t Client::write(const uint8_t*, size_t)
virtual size_t write(const uint8_t buf, size_t size) =0;
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:33:15: note: virtual int Client::available()
virtual int available() = 0;
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:34:15: note: virtual int Client::read()
virtual int read() = 0;
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:36:15: note: virtual int Client::peek()
virtual int peek() = 0;
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:37:16: note: virtual void Client::flush()
virtual void flush() = 0;
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:29:15: note: virtual int Client::connect(IPAddress, uint16_t)
virtual int connect(IPAddress ip, uint16_t port) =0;
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:30:15: note: virtual int Client::connect(const char
, uint16_t)
virtual int connect(const char host, uint16_t port) =0;
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:35:15: note: virtual int Client::read(uint8_t
, size_t)
virtual int read(uint8_t *buf, size_t size) = 0;
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:38:16: note: virtual void Client::stop()
virtual void stop() = 0;
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:39:19: note: virtual uint8_t Client::connected()
virtual uint8_t connected() = 0;
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:40:11: note: virtual Client::operator bool()
virtual operator bool() = 0;
^
try.ino:51:9: error: cannot declare variable 'client' to be of abstract type 'Client'
In file included from C:\Program Files (x86)\Arduino\libraries\Ethernet\src/EthernetClient.h:5:0,
from C:\Program Files (x86)\Arduino\libraries\Ethernet\src/Ethernet.h:7,
from try.ino:24:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Client.h:26:7: note: since type 'Client' has pure virtual functions
class Client : public Stream {
^
cannot allocate an object of abstract type 'Client'

lio00lio:
Grazie a tutti, mi scuso ho modificato gli errori che mi dava ed ora mi da altri problemi strani :frowning:

Wrong language?
This international part of the forum is for postings in English language!
Forum Italiano is here.

Besides of that:
Always use the example programs that are included in the Arduino version that you are actually using!

Your problem seems to be that you are trying to use objects in libraries, that had been renamed several years ago. Your source code reads:

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

But yor webserver example code should read at least (this is from Arduino 1.0.5 IDE):

created 18 Dec 2009
by David A. Mellis
modified 9 Apr 2012
by Tom Igoe

DO NOT USE CODE EXAMPLES THAT ARE FOR IDE VERSIONS BEFORE 1.0!

Current webserver example for Ethernet is to be found in your IDE from the menu:
File - Examples - Ethernet - WebServer

Or at least in your code change the "Client" object to "EthernetClient" so that your code reads:

EthernetClient client = server.available();

thanks a lot , but now I have a problem when I insert the network module does not reach more COM why?

lio00lio:
thanks a lot , but now I have a problem when I insert the network module does not reach more COM why?

What is this "network module" you are talking about?

The "WebServer" example code is for the "Arduino Ethernet Shield" only.

Either the original one or a compatible shield with Wiznet W5100 chip on it.

Are you using an Ethernet shield with W5100 chip?
Or are you using a different "network module" with another chip on it?

lio00lio:
Ciao a tutti,

Ti invitiamo a presentarti (dicci quali conoscenze hai di elettronica e di programmazione) qui: Presentazioni
e a leggere il regolamento se non lo hai già fatto: Regolamento
Qui una serie di link utili, non inerenti al tuo problema:

Il codice devi racchiuderlo nei tag code, vedi sezione 7 del regolamento, spiega bene come fare.
Altrimenti parte del codice può essere visualizzata male o mancare perchè interpretato come attributo del testo stesso.