summaryrefslogtreecommitdiff
path: root/liboctopus/python/demos/blink_status.py
blob: c4b094592452eca931213503381c520e9d6e5a4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)