I am setting up a page on NodeMCU running as a web server and I want to be able to turn on and off a light based on the url being clicked.
I want to know how I can get the status so that I can set the URL based on the pin status as well as pass the GPIO pin status in the JSON from the NodeMCU web server.
The code is here.