Friday, April 21, 2017

ESPBasic Series: Web Interface Slider demo


How easy or complicated is in ESPBasic to have a instant response slider for your MPDMv4 AC Dimmer Web interface?

Just look at the code below:
cls
let xpv = 0
let PWMpin = 5
slider x,150,900
timer 500, [set.dimmer]
wprint "<br><br>"
button " Exit ", [TestExit]

wait

[set.dimmer]
 if x <> xpv then
   io(pwo,PWMpin,x)
   xpv = x
 end if
wait

[TestExit]
wprint |<a href="./edit"> Edit</a>|
end

 Yes, it's all there, plus some extras :)

The Power of ESPBasic !

No comments:

Post a Comment