Tient en passant j'ai encore un petit problème (décidement ] )
plen=es.ES_fill_tcp_data_p(buf,0,PSTR("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n"));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<body bgcolor=\"#4BB5C1\"> "));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<center><p><h1>Domo'Duino, la domotique par Arduino</h1></p> "));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<center><img src=\"http://i25.servimg.com/u/f25/11/05/63/75/domo_d10.png\" > "));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<hr>
<form METHOD=get action=\""));
plen=es.ES_fill_tcp_data(buf,plen,baseurl);
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("\">"));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<h2> REMOTE LED is </h2> "));
if(on_off)
[color=red]plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("ON"));[/color]
else
[color=red]plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("OFF"));[/color]
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR(" </font></h1>
") );
Dans cette partie du code arduino j'ai une partie qui m'affiche ON ou OFF a l'écran, je voudrais remplacer cela par une image ... jusque la ok
En toute logique je met donc en place ce code la a la place
plen=es.ES_fill_tcp_data_p(buf,0,PSTR("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n"));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<body bgcolor=\"#4BB5C1\"> "));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<center><p><h1>Domo'Duino, la domotique par Arduino</h1></p> "));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<center><img src=\"http://i25.servimg.com/u/f25/11/05/63/75/domo_d10.png\" > "));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<hr>
<form METHOD=get action=\""));
plen=es.ES_fill_tcp_data(buf,plen,baseurl);
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("\">"));
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<h2> REMOTE LED is </h2> "));
if(on_off)
[color=red]plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<center><img src=\"http://i45.servimg.com/u/f45/11/05/63/75/on11.png\" > "));[/color]
else
[color=red]plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<center><img src=\"http://i45.servimg.com/u/f45/11/05/63/75/off11.png\" > "));[/color]
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR(" </font></h1>
") );
Mais bon forcement ça ne fonctionne pas. Le compilateur arduino ne me détecte aucune erreur mais lorsque je veut accéder a mon ethernet shield j'ai une erreur comme quoi impossible d'accéder au serveur ... le code ne fonctionne donc pas mais pourquoi ? on dirais que quelque chose bloc la fonction "image" dans cette partie du code ...
Et en même temps je cherche comment mettre en place plusieurs boutons, j'ai beau cherché je ne trouve pas comment avoir deux boutons, a chacune de mes tentatives le compilateur arduino me trouve une erreur ... pourquoi c'est jamais simple =(