- Sat Feb 18, 2017 11:52 am
#62739
I updated Code for 3.0 Branch Alpha. Working perfectly!
For a simple test: After starting the program, press and hold the flash button in the NodeMCU board.
The Status pin GPIO0 will change from 1 to 0.
Refresh page changed to 15 seconds... You can manually change this value in the code.
Code: Select all' ### Working Update for Branch 3,0 Alpha ###
'memclear ' ## Maybe not necessary...
timer 1000, [branch] ' ## Time for auto refresh variables ##
cls
wprint "<head>"
wprint "<meta http-equiv='refresh' content='15'>" '#### Time for automatic refresh page ###
wprint "</head>"
gosub [readdata]
wprint "<table border='1'>"
wprint "<tr>"
wprint "<td>"
wprint "ADC"
wprint "</td>"
wprint "<td>"
wprint htmlvar(ADCin)
wprint "</td>"
wprint "</tr>"
wprint "<tr>"
wprint "<td>"
wprint "GPIO0"
wprint "</td>"
wprint "<td>"
wprint htmlvar(PIO0)
wprint "</td>"
wprint "</tr>"
wprint "<tr>"
wprint "<td>"
wprint "GPIO2"
wprint "</td>"
wprint "<td>"
wprint htmlvar(PIO2)
wprint "</td>"
wprint "</tr>"
wprint "<tr>"
wprint "</table>"
wprint "<p>"
wprint "It will Stopped Timer and END Program ==> "
button End, [TestExit]
print "Otherwise the timer is left running and then it is difficult to access the ESP8266 Basic Interpreter window"
wait
[TestExit]
timer 0
end
[branch]
gosub [readdata]
wait
[readdata]
ADCin = io(ai) 'update variable with latest analog in
PIO0 = io(pi , 0) ' PIO0
PIO2 = io(pi , 2) ' PIO2
return