Code in echten Code konvertiert
This commit is contained in:
1 parent
b93d6f65fa
commit
f72538fc63
2 files changed
+30
-15
No files matched your search
+16
-7
@@ -1,13 +1,22 @@
|
||||
import inc/robot-inc
|
||||
#!/usr/bin/env python2
|
||||
#-*- coding:utf-8 -*-
|
||||
|
||||
import sys
|
||||
sys.path.append("inc")
|
||||
from robot_inc import *
|
||||
|
||||
linkeFlasche=GPIO_17
|
||||
rechteFlasche=GPIO_27
|
||||
|
||||
# Rezept für Apfelsaft
|
||||
gpio_on linkeFlasche
|
||||
sleep 0.5
|
||||
gpio_off linkeFlasche
|
||||
gpio_on (linkeFlasche)
|
||||
sleep (0.5)
|
||||
gpio_off (linkeFlasche)
|
||||
|
||||
gpio_on rechteFlasche
|
||||
sleep 1.5
|
||||
gpio_off rechteFlasche
|
||||
gpio_on (rechteFlasche)
|
||||
sleep (1.5)
|
||||
gpio_off (rechteFlasche)
|
||||
|
||||
# oder in einer Funktion
|
||||
#gpio_on_for (linkeFlasche, 0.5)
|
||||
#gpio_on_for (rechteFlasche, 1.5)
|
||||
Reference in new issue
Block a user