summaryrefslogtreecommitdiff
path: root/mesecons_luacontroller/help/mesecons.txt
diff options
context:
space:
mode:
Diffstat (limited to 'mesecons_luacontroller/help/mesecons.txt')
-rw-r--r--mesecons_luacontroller/help/mesecons.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/mesecons_luacontroller/help/mesecons.txt b/mesecons_luacontroller/help/mesecons.txt
new file mode 100644
index 0000000..8b8d562
--- /dev/null
+++ b/mesecons_luacontroller/help/mesecons.txt
@@ -0,0 +1,24 @@
+Mesecons I/O
+============
+
+Luacontrollers provide four pins for mesecons connections, labeled from A to D.
+There is no need to manually switch between input and output modes - any pin not outputting mesecons power automatically works as an input.
+
+Input states can be read from the pin table.
+Example:
+if pin.a then
+ --Code here would be run only if pin A is active
+end
+
+Outputs can be set by writing to the port table.
+Example:
+port.b = true --Outputs a signal on pin B
+
+When a pin starts or stops receiving a signal, an event occurs with some information about the pin.
+Example:
+{
+ type = "on",
+ pin = {
+ name = "A"
+ }
+}