How can I pull a variable located in Arduino RAM through an Ethernet Shield from my PHP (WAMP) server?
e.g I have variable red_led = 1
in the Arduino, now how can I pull that info to my PHP server?
|
If you have a public IP address in your Arduino device, you can repeatedly make requests from your WAMP server. But the Arduino has to listen on some port and respond to your request. The better solution is, every time the variable changes its state, the Arduino connects to your WAMP server and sends the desired data. For example, it makes an HTTP GET request:
And that's it. Every time, when the Arduino sends a GET request, you can process it on your server. If you just want to print some graphs based on your variable, you can use Pachube. |
|||||
|