Line 7... |
Line 7... |
7 |
|
7 |
|
8 |
gpio.wiringPiSetupGpio() |
8 |
gpio.wiringPiSetupGpio() |
9 |
gpio.pinMode(power_sense_pin, 0) |
9 |
gpio.pinMode(power_sense_pin, 0) |
10 |
gpio.pullUpDnControl(power_sense_pin, 0) |
10 |
gpio.pullUpDnControl(power_sense_pin, 0) |
11 |
|
11 |
|
12 |
time.sleep(2) |
12 |
time.sleep(30) # wait for complete startup. |
13 |
|
13 |
|
14 |
oldstav = gpio.digitalRead(power_sense_pin) |
14 |
oldstav = gpio.digitalRead(power_sense_pin) |
15 |
|
15 |
|
16 |
while True: |
16 |
while True: |
17 |
stav = gpio.digitalRead(power_sense_pin) |
17 |
stav = gpio.digitalRead(power_sense_pin) |