I'm working with an arduino uno and a sparkfun poe ethernet shield. I'm trying to setup a very simple http server that allows me to get a value from the analog pins through a wget request on a linux box. for the most part the communication works, but the returned data from the wget has a lot of random junk in it
here's the sketch i'm running
#include <Ethernet.h>
#include <SPI.h>
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress ip(192,168,1,177);
IPAddress gateway(192,168,1,1);
IPAddress subnet(255, 255, 255, 0);
EthernetServer server(80);
void setup() {
Ethernet.begin(mac, ip);
server.begin();
pinMode(4,OUTPUT);
digitalWrite(4,HIGH);
delay(1000);
}
void loop() {
EthernetClient client = server.available();
if (client) {
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/plain");
client.println();
client.print("Temperature: ");
client.println();
delay(10);
client.stop();
}
}
but when i do a wget i get
...snipped...scrolls a lot of data...
PF?alp&?k3c? ???3D?4???d?N?s?vw??dH?|?R
???X???2s-#?>4??;??n?Q?w??c.??_rD?g??T???@?-?yA?K????@"?"uM?5???^lM3|bH???<?]?&?H???kP??X?x??jD ??r?Z6??B[??+e??6:)?i?QX???|?T????????>?-??bf??)'w?Q^?????1??Z??0?q+?????<u???1?}??X??C??????A??LMP????A?M "?"
???2??;??WU???gA???|Yk??1e?V?.Dlg?u?c'?z?z?u?K?????g???P$?#8|[rWq????Y????a?n??j???-? ->.?a|?? ?e??q??@????$Sra2m?ö???Qn"?4%^P??M??*$?a?z?2?pf~?:???y{???rN-?????Qy???????J?A
NIp?$!????(??N?T
V??U?<nJ?
/>
Content-Type: text/plain
Temperature:
: text/pHTTP/1.1 200 OK
Content-Type: text/plain
Temperature:
ure:
OK
ContenHTTP/1.1 200 OK
Content-TyHTTP/1.1 200 OK
Content-Type: text/plain
Temperature:
Connection closed by foreign host.
but eventually i do get some html spit out, can advise me on what might be going wrong