But don’t know how to actually use it, yes, It didn’t work. But let’s not actually discuss that. Can someone give me an example to toggle pin D0 from the browser with button inputs? It’s not that I’m a newbie in HTML and JS (Nor above average). It’s the parameters.
This guide discusses how to call the API directly, and has an example of what you’re looking for:
In that case, you might want to be more careful when saying things like…
That might set (evidently) incorrect expectations, which is much rather avoided.
In all honesty though, I’m not sure that that tutorial can be made much simpler. You’ve got a button, and when you click it (or change the value), it executes a function. In that function you make a call to the REST API that triggers your function on the device.
Then there’s a polling thing going on where it checks a variable at a set interval and updates the corresponding boxes.
What exactly do you have troubles with understanding, perhaps we can clarify that? Alternatively, copy the code, and try reducing it to a bare minimum: single button, blink an LED Just try to see what happens when you change something.