About Buy News Guide Ideas
The phatIO project has finished, and I'm no longer selling ready made boards - but you're welcome to look around - send any questions to the email below

Back to Table of Contents


The scheduler allows code to be executed at regular intervals.

##(every <millis> <code> ...)[every] Will execute the remaining arguments every <millis> milliseconds. millis can currently be between 1 and 65535 milliseconds (65 seconds).

For example the following will print “ping” to the keyboard every 2 seconds:

(every 2000 (keyboard "ping"))

The above will toggle/flash pin 0 every 100ms:

(defvar t 0)
(pinmode 0 OUT)
(every 100 (setpin 0 (= t (~ t))))
@Contact  |   Legal & Privacy  |    RSS  |   Development Twitter  |   Official Twitter
© phatIO 2012, All Rights Reserved.