update
This commit is contained in:
1 parent
34442606fe
commit
5e105c026c
3 files changed
+21
-10
No files matched your search
+9
-9
@@ -12,17 +12,17 @@ GPIO_23=22
|
||||
GPIO_2=3
|
||||
GPIO_3=5
|
||||
|
||||
def gpio_on (param1)
|
||||
def gpio_on (theGPIO):
|
||||
# param1=INT # gpio#Nr
|
||||
GPIO.setup(param1, GPIO.OUT)
|
||||
GPIO.output(param1,True) # lamp on
|
||||
GPIO.setup(theGPIO, GPIO.OUT)
|
||||
GPIO.output(theGPIO,True) # lamp on
|
||||
|
||||
def gpio_off (param1):
|
||||
def gpio_off (theGPIO):
|
||||
# param1=INT # gpio#Nr
|
||||
GPIO.setup(param1, GPIO.OUT)
|
||||
GPIO.output(param1,False) # lamp on
|
||||
GPIO.setup(theGPIO, GPIO.OUT)
|
||||
GPIO.output(theGPIO,False) # lamp on
|
||||
|
||||
def gpio_on_for (param1, miliSec):
|
||||
gpio_on (param1)
|
||||
def gpio_on_for (theGPIO, miliSec):
|
||||
gpio_on (theGPIO)
|
||||
sleep miliSec
|
||||
gpio_off (param1)
|
||||
gpio_off (theGPIO)
|
||||
+11
@@ -1,2 +1,13 @@
|
||||
import inc/robot-inc
|
||||
|
||||
linkeFlasche=GPIO_17
|
||||
rechteFlasche=GPIO_27
|
||||
|
||||
# Rezept für Apfelsaft
|
||||
gpio_on linkeFlasche
|
||||
sleep 0.5
|
||||
gpio_off linkeFlasche
|
||||
|
||||
gpio_on rechteFlasche
|
||||
sleep 1.5
|
||||
gpio_off rechteFlasche
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
echo starte robot
|
||||
cd ~/robotik-WS-2022
|
||||
sudo ./testled.py
|
||||
sudo ./robot-a.py
|
||||
Reference in new issue
Block a user