commit
89662eb0bf
@ -26,13 +26,13 @@ pin:
|
||||
-->
|
||||
#Ryanteck Motor Controller Board
|
||||
|
||||
###A quick and easy way to start driving motors on your Raspberry Pi
|
||||
###Ein schneller und einfacher Weg um Motoren mit deinem Pi zu steuern.
|
||||
|
||||
```python
|
||||
##Simple motor script for the RTK-000-001
|
||||
##Simples Motor Script für den RTK-000-001
|
||||
import RPi.GPIO as GPIO
|
||||
import time
|
||||
#Set to broadcom pin numbers
|
||||
#Setze BCM Broadcom Pin Nummern
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
|
||||
#Motor 1 = Pins 17 and 18
|
||||
@ -40,7 +40,7 @@ GPIO.setmode(GPIO.BCM)
|
||||
GPIO.setup(17, GPIO.OUT)
|
||||
GPIO.setup(18, GPIO.OUT)
|
||||
|
||||
#Now loop forever turning one direction for 5 seconds, then the other
|
||||
#Jetzt wird jede Richtung für 5 Sekunden in einer Endlosschleife durchlaufen.
|
||||
while (True):
|
||||
#Sleep 1 second then turn 17 on
|
||||
GPIO.output(18, 0)
|
||||
@ -55,4 +55,4 @@ while (True):
|
||||
#And loop back around
|
||||
#And final cleanup
|
||||
GPIO.cleanup()
|
||||
```
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user