Code in echten Code konvertiert

This commit is contained in:
ub committed 2023-01-06 23:51:52 +01:00
1 parent 5e105c026c
commit b93d6f65fa
1 file changed
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env python2
import RPi.GPIO as GPIO
import time
valid_led = [32,15,31,22,3,5];
GPIO_23=22
GPIO_17=32
GPIO_18=15
GPIO_27=31
GPIO_23=22
GPIO_2=3
GPIO_3=5
def gpio_on (theGPIO):
# param1=INT # gpio#Nr
GPIO.setup(theGPIO, GPIO.OUT)
GPIO.output(theGPIO,True) # lamp on
def gpio_off (theGPIO):
# param1=INT # gpio#Nr
GPIO.setup(theGPIO, GPIO.OUT)
GPIO.output(theGPIO,False) # lamp on
def gpio_on_for (theGPIO, miliSec):
gpio_on (theGPIO)
sleep miliSec
gpio_off (theGPIO)