How can I run a webserver in a Arduino Uno? I want to use my Arduino to monitor things in my home such as temperature. I want to be able to access this data through the internet.
You'll need something like the Ethernet Shield to connect your Arduino Uno to a LAN. As for webserver functionality, the Webserver Example sketch does the bulk of what you need. For the "access this data through the internet" part, assuming you want access beyond your LAN; you'll need to perform Port Forwarding on your local router (i.e. allow the "Internet" to see your Arduino). If you need wifi, then personally I prefer the CC3300 to the Arduino Wifi shield. |
|||||||||||||||||
|
The Arduino Yún has been made with this use case in mind. The Bridge library allows your sketch to publish data such as sensor readings: this data is available through a REST api. Say you want to publish the temperature of your living room: you'll write something like
You can then access the data via web with a URL like
You can get all sensor readings without specifying the key name, with
|
|||
|