ESP8266 BASIC

Timer Example ​(3.0 branch only)

​timer 5000, [do.some.stuff]
print "going to do some stuff in a bit"
button "Click me to exit", [Exit.ThisThing]
wait

[do.some.stuff]
print "Doing Some Stuff"
wait

[Exit.ThisThing]
end
A timer lets you execute a branch at a regular interval.

In this example the timer will fire ever 5 seconds and print some text to your browser window.

​This is useful if you need to take a sensor measurement or do some other task periodically.

AltStyle によって変換されたページ (->オリジナル) /