Re: GPIO and PWM with GUI
![Post Post](./styles/FLATBOOTS/imageset/icon_post_target.gif)
I seem to remember someone asking if a slider value could be read and actioned without needing to press a 'read' button.
The answer is 'yes' if using a timer, as shown in the attached script.
Note that the new value only gets read when the slider is released.
The answer is 'yes' if using a timer, as shown in the attached script.
Note that the new value only gets read when the slider is released.
Code: Select all
cls
let pinNo = 1
let Brightness = 512
print "Control PIN"
textbox pinNo
print " Brightness"
textbox Brightness
slider Brightness,0,1024
timer 200,[SetBrightness]
'button " Set Brightness",[SetBrightness]
button " Exit ", [TestExit]
wait
[SetBrightness]
io(pwo,pinNo,Brightness)
wait
[TestExit]
end