From 243a8063ddbb107ab191aa333cc6cdc85701f410 Mon Sep 17 00:00:00 2001 From: cheapie Date: Sun, 2 Jan 2022 18:42:08 -0600 Subject: Add Luacontroller examples/help system --- mesecons_luacontroller/examples/rslatch.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 mesecons_luacontroller/examples/rslatch.lua (limited to 'mesecons_luacontroller/examples/rslatch.lua') diff --git a/mesecons_luacontroller/examples/rslatch.lua b/mesecons_luacontroller/examples/rslatch.lua new file mode 100644 index 0000000..1257396 --- /dev/null +++ b/mesecons_luacontroller/examples/rslatch.lua @@ -0,0 +1,18 @@ +--R/S Latch +--When S is active, Q turns on. +--When R is active, Q turns off. +--/Q is always the opposite of Q. + +--Pin Assignments: +-- S: Pin A +-- R: Pin B +-- Q: Pin C +--/Q: Pin D + +if pin.a then + port.c = true +elseif pin.b then + port.c = false +end + +port.d = not port.c -- cgit v1.2.3