Retrieve variable on core from hosted web server

I followed the example in this post

using the code posted here

and thanks to the great example was able to get it to work very seamlessly! However I was wondering if it was possible to retrieve a variable that is posted through some sort of web form on the web server?

This looks to be on the right track on the arduino board, or at least something similar to what I would be looking to do.

Part 5
http://startingelectronics.org/tutorials/arduino/ethernet-shield-web-server-tutorial/web-server-LED-control/

Hi @lawless,

You might be interested in the web API, or webhooks:

http://docs.particle.io/photon/api/#introduction-requesting-a-variable-value

http://docs.particle.io/photon/webhooks/

Thanks!
David

I have gotten it to work over the cloud successfully. I am looking for the ability to embed a webserver on the core and then access it via local LAN w/o it being connected to the internet and passing it a string where it can be used on the core.

I have also found this example that seems to be in the right direction but definitely far over my head...

This seems to be far more advanced then what I need. Basically just looking to embed a web server on the core and pass the embedded web server a string it can use as a variable on the core.

1 Like

Ahh, have you checked out the “Webserver” library in the IDE?

Thanks,
David

I will take a look at that example, sorry I am very new to all the embedded stuff. I will see if I can get this to do what I want it to. I got the buzzer example to work, this is definitely on the right track, thank you.

1 Like

Yes we would love a RESTful service being pre installed, right at the delivery of the photon.
If you look at http://www.cainetworks.com/products/webcontrol/index.html you may see the approach at a competitor, unfortunately not supporting wireless from the start.

1 Like