Place to put your Basic demos and examples

Moderator: Mmiscool

User avatar
By dziloo@wp.pl
#63144 I Update The Code for ESP Basic Alpha 3.xx Branch. Working very good !!!

Code: Select all
'For ESP Basic Alpha 3.xx Branch
'The following code will dim an led on pin 2 using a slider control
'This LED is Blue color in NodeMcu board

lightlevel = 0

slider lightlevel, 0, 1023
button "Set level", [set.it]
wait

[set.it]
io(pwo, 2, lightlevel)
wait

User avatar
By heckler
#63163 Hi dziloo,
If you add this...
timer 200,[set.it]

into the code and then a textbox to show the value it will update the light level automatically. :D

see example below

regards
dwight

Code: Select all'For ESP Basic Alpha 3.xx Branch
'The following code will dim an led on pin 2 using a slider control
'This LED is Blue color in NodeMcu board

lightlevel = 0

wprint "0 "
slider lightlevel, 0, 1023
wprint " 1023"
button "Set level", [set.it]
print " Light Level Now = "
textbox lightlevel
timer 200, [set.it]
wait

[set.it]
io(pwo, 2, lightlevel)
wait

- See more at: http://www.esp8266.com/viewtopic.php?f=40&t=6537&start=4#sthash.qFM08C6d.dpuf