diff options
Diffstat (limited to 'liboctopus/python/demos/blink.py')
-rw-r--r-- | liboctopus/python/demos/blink.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/liboctopus/python/demos/blink.py b/liboctopus/python/demos/blink.py new file mode 100644 index 0000000..3e454af --- /dev/null +++ b/liboctopus/python/demos/blink.py @@ -0,0 +1,22 @@ +#blink.py +#laesst die led1 (26) blinken + + +from octopus import * +import time + + +op=octopus_context() +octopus_init(op) +octopus_open(op) +octopus_io_init(op,26) + +octopus_io_set_pin_direction_out(op,26) + +while 1: + octopus_io_set_pin(op,26,1) + time.sleep(1) + octopus_io_set_pin(op,26,0) + time.sleep(1) + + |