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.
interrupt 0 [test]
wait
[test]
po d4 io(pi,0,)
print "It was triggered"
wait
http://esp8266basic.com
A BASIC interpreter for your ESP
Working now on Autodrop3d. A 3d printer with automatic part ejection system. https://autodrop3d.com