Project:Nanode/Applications: Difference between revisions

From London Hackspace Wiki

Line 217: Line 217:
And your Nanode should serve its first webpage. It doesn't do much, but does have a clickable link to Andy Lindsay's blog page.
And your Nanode should serve its first webpage. It doesn't do much, but does have a clickable link to Andy Lindsay's blog page.


Now, edit the code and chance every reference to Arduino in these lines to Nanode
Now, edit the code and chagce every reference to Arduino in the print_webpage function to Nanode
 
so the code looks like this:
 
plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<html><head><title>Nanode ENC28J60 Ethernet Shield V1.0</title></head><body>"));
  plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<center><h1>Welcome to Nanode ENC28J60 Ethernet Shield V1.0</h1>"));
  plen=es.ES_fill_tcp_data_p(buf,plen,PSTR("<hr><br><h2><font color=\"blue\">-- Put your Nanode online -- "));


// prepare the webpage by writing the data to the tcp send buffer
uint16_t print_webpage(uint8_t *buf)


Now re-compile and upload and refresh your browser window - you should see the text changes you made in the code reflected in the served page.
Now re-compile and upload and refresh your browser window - you should see the text changes you made in the code reflected in the served page.
552

edits