summaryrefslogtreecommitdiff
path: root/liboctopus/python/demos/blink_status.py
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2011-10-11 21:50:49 +0200
committerYves Fischer <yvesf-git@xapek.org>2011-10-11 21:50:49 +0200
commit324c5ba9098c1010d0aa8c1e26b95509878ce9f2 (patch)
treef6ef2d537decaa2e1af6d4b9c4c31161b22333ec /liboctopus/python/demos/blink_status.py
downloadmini-octopus-324c5ba9098c1010d0aa8c1e26b95509878ce9f2.tar.gz
mini-octopus-324c5ba9098c1010d0aa8c1e26b95509878ce9f2.zip
Mini-Octopus build from r@171
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)