diff options
author | cheapie <no-email-for-you@example.com> | 2022-01-02 18:42:08 -0600 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2022-01-02 18:42:08 -0600 |
commit | 243a8063ddbb107ab191aa333cc6cdc85701f410 (patch) | |
tree | 848d72cd8b91cc9d259f75196bfd577bd8e88e66 /mesecons_luacontroller/examples/clock.lua | |
parent | 648f77bd43f1fbe59e6d655e57d96e2647a43b68 (diff) | |
download | mesecons-243a8063ddbb107ab191aa333cc6cdc85701f410.tar mesecons-243a8063ddbb107ab191aa333cc6cdc85701f410.tar.gz mesecons-243a8063ddbb107ab191aa333cc6cdc85701f410.tar.bz2 mesecons-243a8063ddbb107ab191aa333cc6cdc85701f410.tar.xz mesecons-243a8063ddbb107ab191aa333cc6cdc85701f410.zip |
Add Luacontroller examples/help system
Diffstat (limited to 'mesecons_luacontroller/examples/clock.lua')
-rw-r--r-- | mesecons_luacontroller/examples/clock.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesecons_luacontroller/examples/clock.lua b/mesecons_luacontroller/examples/clock.lua new file mode 100644 index 0000000..262aac2 --- /dev/null +++ b/mesecons_luacontroller/examples/clock.lua @@ -0,0 +1,7 @@ +--Interrupt-Driven Clock +--Continually pulses pin A, turning on/off once per second. + +if event.type == "program" or event.iid == "clock" then + port.a = not port.a + interrupt(1,"clock",true) +end |