summaryrefslogtreecommitdiff
path: root/liboctopus/python/demos/blink_status.py
diff options
context:
space:
mode:
Diffstat (limited to 'liboctopus/python/demos/blink_status.py')
-rw-r--r--liboctopus/python/demos/blink_status.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/liboctopus/python/demos/blink_status.py b/liboctopus/python/demos/blink_status.py
new file mode 100644
index 0000000..c4b0945
--- /dev/null
+++ b/liboctopus/python/demos/blink_status.py
@@ -0,0 +1,26 @@
+# blink_status.py
+# laesst die status led (11) blinken
+
+import sys
+sys.path.append("..\\..\\libs\\python")
+
+
+from octopus import *
+import time
+
+
+op=octopus_context()
+octopus_init(op)
+octopus_open(op)
+octopus_io_init(op,11)
+
+octopus_io_set_pin_direction_out(op,11)
+
+octopus_io_set_pin(op,11,0)
+
+
+while 1:
+ octopus_io_set_pin(op,11,1)
+ time.sleep(1)
+ octopus_io_set_pin(op,11,0)
+ time.sleep(1)