16 webiopi.debug(
"Blink script - Setup")
18 GPIO.setFunction(SWITCH, GPIO.IN)
19 GPIO.setFunction(SERVO, GPIO.PWM)
20 GPIO.setFunction(LED0, GPIO.PWM)
21 GPIO.setFunction(LED1, GPIO.OUT)
23 GPIO.pwmWrite(LED0, 0.5)
24 GPIO.pwmWriteAngle(SERVO, 0)
25 GPIO.digitalWrite(LED1, GPIO.HIGH)
30 value =
not GPIO.digitalRead(LED1)
31 GPIO.digitalWrite(LED1, value)
36 webiopi.debug(
"Blink script - Destroy")
38 GPIO.setFunction(SWITCH, GPIO.IN)
39 GPIO.setFunction(SERVO, GPIO.IN)
40 GPIO.setFunction(LED0, GPIO.IN)
41 GPIO.setFunction(LED1, GPIO.IN)