Added interrupts for pin changes
Posted: Thu Dec 31, 2015 4:32 am
Added a new command. (ESP Basic 1.69)
Documentation here
http://www.esp8266basic.com/timers-and-interrupts.html
INTERRUPT:
Will execute a specific branch when a pins status changes. The interrupt polling only occurs when the esp is waiting and useful for things like push buttons trigger events. The branch must end with the wait command.
interrupt {pin no} {branch label}
to disable an interrupt specify no branch label.
interrupt {pin no}
Example:
Will check if the status of pin zero has changed and light the on board led when the button is triggered.
Documentation here
http://www.esp8266basic.com/timers-and-interrupts.html
INTERRUPT:
Will execute a specific branch when a pins status changes. The interrupt polling only occurs when the esp is waiting and useful for things like push buttons trigger events. The branch must end with the wait command.
interrupt {pin no} {branch label}
to disable an interrupt specify no branch label.
interrupt {pin no}
Example:
Will check if the status of pin zero has changed and light the on board led when the button is triggered.
Code: Select all
interrupt 0 [test]
wait
[test]
po d4 io(pi,0,)
print "It was triggered"
wait