I couldn't find any example code for making a web server with the Arduino 12 IDE - so I knuckled down and struggled through writing my own, and learned a LOT in the meantime. This example displays all the analog pin's values, and lets you set the Digital output pins on or off. Its HTML web code so it is necessarily messy. There are comments, such that they are, to try and shed some light on the process.
The Wiznet can deal with more than one connection, so I had to make sure that any new page got what the current digital pins values. But had to sacrifice the ability to turn all the pins off.
HTML is a bite, and to truly do something that would be useful it would need a telnet connection so we could get some dedicated two way communication - and or a little AJAX code in the browser page to update things in real time.... That is for another day.
HTML is a bite, and to truly do something that would be useful it would need a telnet connection so we could get some dedicated two way communication - and or a little AJAX code in the browser page to update things in real time.... That is for another day.
If you change the code - make it more useful - do me a favor and drop me a line letting me know. I'll practice now heaping praise - ohhh awwww - fantastic!!!!
Hope its helps someone....
the code is here
Hope its helps someone....
the code is here
3 comments:
I love your code, thanks.
I couldn't find much example about how to make a web server with arduino and wiznet but your code is simple and efficient. Keep on the good work.
Hello. Nice code
I am new to arduino and in C
I tried your code and it works almost OK
What I did was add one led at Digital pin 7 with a 2K resistor.
If I check the checkbox 7 on ther server page and press submit it lights up . If I uncheck it and press submit it does not turn off.
Any ideas
Thanks again for sharing this code
how can a use it with the new
enc28j60 ?
I did copy de software for
the enc28j60 but a got a lot
off mistakes
Post a Comment