You can't have the pico reach out to a webpage and change things on it without having stuff on the server side that hosts the page, or using websockets.
Either:
Have the page make a request which the Pico responds to with the current light - might be easiest?
If that page is not hosted on the Pico, you could have the Pico making requests to another page on the server, while the page with the UI on it requests a different page from the server to get that information. (php and that crude key-value cache is enough to make this work - that's what I use for my web control panels)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
You can't have the pico reach out to a webpage and change things on it without having stuff on the server side that hosts the page, or using websockets.
Either:
Have the page make a request which the Pico responds to with the current light - might be easiest?
If that page is not hosted on the Pico, you could have the Pico making requests to another page on the server, while the page with the UI on it requests a different page from the server to get that information. (php and that crude key-value cache is enough to make this work - that's what I use for my web control panels)
Use websockets