Using javascript to display data

I’m not sure where to ask this because there’s so much I don’t know yet.

I have some Arduino background but Javascript is completely foreign to me. I have a particle photon and have some projects in mind. For the time being I want to learn how to simply display data on a web page. For example, is this switch open or closed? What is the value of this sensor? etc.

I am working my way through this book: “Getting Started with the Photon
Making Things with the Affordable, Compact, Hackable WiFi Module”

This is the firmware running on the device:

This is the html on my page:

My question:
Instead of all of the fancy meters and visuals, how would I simply display the same data, in plain text?

Hi @decoy5657

You should check out my example here:

Reading Spark Variables with Your Own HTML File

The basic idea is that find an area of the web page by its ID and then update it.


Hi @decoy5657

Curios what are you using to get a reading of volts? Is it the volts of the Photon?

it’s the voltage of a photocell