Setting up communication between photon and webpage

Hi,

I am new to particle and am trying to display voltage values from the particle to a webpage. I’m finding it a little difficult to wrap my head around how to structure this. I’ve done this once before on a different platform and the way it worked was that I sent a GET request which returned the values in response. However, I would like to do this asynchronously without having to reload the webpage every time I ask for new values. I want my values to be displayed in a designated spot on the webpage. However, when I click on the “Get value” button that I set up, it gives me the raw response from the Particle cloud/device. Basically, I want real time values on my web page.
Thanks

Hi @shrm145

Have you looked at the tutorial section here on the forum yet? I would recommend this tutorial I wrote that uses an automatic reload every second to get values from a Particle variable. You could also use Particle publish and there are several tutorials on that as well. The difference is a pull versus a push model for updating values.

4 Likes

Thanks a lot ! I think that gives me a better idea !

1 Like