Update RTK MCB in all languages
This commit is contained in:
parent
358c71c6ea
commit
7209f161ea
|
@ -1,6 +1,6 @@
|
|||
<!--
|
||||
---
|
||||
name: Motorsteuerung
|
||||
name: RTK Motorsteuerung
|
||||
class: board
|
||||
type: alle
|
||||
formfactor: Andere
|
||||
|
@ -34,31 +34,22 @@ pin:
|
|||
###Ein schneller und einfacher Weg um Motoren mit deinem Pi zu steuern.
|
||||
|
||||
```python
|
||||
##Simples Motor Script für den RTK-000-001
|
||||
import RPi.GPIO as GPIO
|
||||
import time
|
||||
#Setze BCM Broadcom Pin Nummern
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
from gpiozero import RyanteckRobot
|
||||
from time import sleep
|
||||
|
||||
#Motor 1 = Pins 17 and 18
|
||||
#Motor 2 = Pins 22 and 23
|
||||
GPIO.setup(17, GPIO.OUT)
|
||||
GPIO.setup(18, GPIO.OUT)
|
||||
robot = RyanteckRobot()
|
||||
|
||||
#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)
|
||||
time.sleep(1)
|
||||
GPIO.output(17, 1);
|
||||
time.sleep(5);
|
||||
#And now the other way round
|
||||
GPIO.output(17, 0)
|
||||
time.sleep(1);
|
||||
GPIO.output(18, 1);
|
||||
time.sleep(5);
|
||||
#And loop back around
|
||||
#And final cleanup
|
||||
GPIO.cleanup()
|
||||
while True:
|
||||
robot.forward()
|
||||
sleep(5)
|
||||
robot.left()
|
||||
sleep(1)
|
||||
robot.backward()
|
||||
sleep(5)
|
||||
robot.right()
|
||||
sleep(1)
|
||||
robot.stop()
|
||||
sleep(1)
|
||||
```
|
||||
|
||||
[GPIO Zero docs](http://gpiozero.readthedocs.io/en/v1.3.1/api_boards.html#ryanteck-mcb-robot)
|
||||
|
|
|
@ -63,4 +63,4 @@ while True:
|
|||
sleep(1)
|
||||
```
|
||||
|
||||
See [GPIO Zero docs page](http://gpiozero.readthedocs.io/en/v1.3.1/api_boards.html#ryanteck-mcb-robot)
|
||||
[GPIO Zero docs](http://gpiozero.readthedocs.io/en/v1.3.1/api_boards.html#ryanteck-mcb-robot)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!--
|
||||
---
|
||||
name: Controlador de Motor
|
||||
name: RTK Controlador de Motor
|
||||
class: board
|
||||
type: todas
|
||||
formfactor: Otro
|
||||
|
@ -34,26 +34,22 @@ pin:
|
|||
###Una manera rápida y fácil de empezar a controlar motores en tu Raspberry Pi
|
||||
|
||||
```python
|
||||
import RPi.GPIO as GPIO
|
||||
import time
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
from gpiozero import RyanteckRobot
|
||||
from time import sleep
|
||||
|
||||
#Motor 1 = Pines 17 y 18
|
||||
#Motor 2 = Pines 22 y 23
|
||||
GPIO.setup(17, GPIO.OUT)
|
||||
GPIO.setup(18, GPIO.OUT)
|
||||
robot = RyanteckRobot()
|
||||
|
||||
#Bucle infinito, girando en una dirección 5 segundos, después en la otra
|
||||
while (True):
|
||||
GPIO.salida(18, 0)
|
||||
time.sleep(1)
|
||||
GPIO.salida(17, 1);
|
||||
time.sleep(5);
|
||||
#Ahora para el otro lado
|
||||
GPIO.salida(17, 0)
|
||||
time.sleep(1);
|
||||
GPIO.salida(18, 1);
|
||||
time.sleep(5);
|
||||
#Y limpieza final
|
||||
GPIO.cleanup()
|
||||
while True:
|
||||
robot.forward()
|
||||
sleep(5)
|
||||
robot.left()
|
||||
sleep(1)
|
||||
robot.backward()
|
||||
sleep(5)
|
||||
robot.right()
|
||||
sleep(1)
|
||||
robot.stop()
|
||||
sleep(1)
|
||||
```
|
||||
|
||||
[GPIO Zero docs](http://gpiozero.readthedocs.io/en/v1.3.1/api_boards.html#ryanteck-mcb-robot)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!--
|
||||
---
|
||||
name: Contrôleur moteur
|
||||
name: RTK Contrôleur moteur
|
||||
class: board
|
||||
type: Tous
|
||||
formfactor: Autre
|
||||
|
@ -31,24 +31,25 @@ pin:
|
|||
-->
|
||||
#Contrôleur moteur Ryanteck RTK-000-001
|
||||
|
||||
###Contrôler un moteur connecté au RTK-000-001 depuis votre Raspberry Pi est aisé:
|
||||
###Contrôler un moteur connecté au RTK-000-001 depuis votre Raspberry Pi est aisé:
|
||||
|
||||
```python
|
||||
import RPi.GPIO as GPIO
|
||||
import time
|
||||
from gpiozero import RyanteckRobot
|
||||
from time import sleep
|
||||
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
GPIO.setup(17, GPIO.OUT)
|
||||
GPIO.setup(18, GPIO.OUT)
|
||||
robot = RyanteckRobot()
|
||||
|
||||
while (True):
|
||||
GPIO.output(18, 0)
|
||||
time.sleep(1)
|
||||
GPIO.output(17, 1);
|
||||
time.sleep(5);
|
||||
GPIO.output(17, 0)
|
||||
time.sleep(1);
|
||||
GPIO.output(18, 1);
|
||||
time.sleep(5);
|
||||
GPIO.cleanup()
|
||||
```
|
||||
while True:
|
||||
robot.forward()
|
||||
sleep(5)
|
||||
robot.left()
|
||||
sleep(1)
|
||||
robot.backward()
|
||||
sleep(5)
|
||||
robot.right()
|
||||
sleep(1)
|
||||
robot.stop()
|
||||
sleep(1)
|
||||
```
|
||||
|
||||
[GPIO Zero docs](http://gpiozero.readthedocs.io/en/v1.3.1/api_boards.html#ryanteck-mcb-robot)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!--
|
||||
---
|
||||
name: Motor Controller Board
|
||||
name: RTK Motor Controller Board
|
||||
class: board
|
||||
type: Tutti
|
||||
formfactor: Altro
|
||||
|
@ -34,31 +34,22 @@ pin:
|
|||
###Una maniera facile e veloce per controllare dei motori dal tuo Raspberry
|
||||
|
||||
```python
|
||||
# Semplice script per i motori dell'RTK-000-001
|
||||
import RPi.GPIO as GPIO
|
||||
import time
|
||||
# Imposta la numerazione Broadcom
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
from gpiozero import RyanteckRobot
|
||||
from time import sleep
|
||||
|
||||
# Motore 1 = Pin 17 e 18
|
||||
# Motore 2 = Pin 22 e 23
|
||||
GPIO.setup(17, GPIO.OUT)
|
||||
GPIO.setup(18, GPIO.OUT)
|
||||
robot = RyanteckRobot()
|
||||
|
||||
# Ora ripeti all'infinito attivando
|
||||
# alternativamente ogni direzione per 5s
|
||||
while (True):
|
||||
# Sleep di 1 secondo, poi attiva il 17
|
||||
GPIO.output(18, 0)
|
||||
time.sleep(1)
|
||||
GPIO.output(17, 1);
|
||||
time.sleep(5);
|
||||
# Ed ora l'opposto
|
||||
GPIO.output(17, 0)
|
||||
time.sleep(1);
|
||||
GPIO.output(18, 1);
|
||||
time.sleep(5);
|
||||
# E si ricomincia
|
||||
# Cleanup finale
|
||||
GPIO.cleanup()
|
||||
```
|
||||
while True:
|
||||
robot.forward()
|
||||
sleep(5)
|
||||
robot.left()
|
||||
sleep(1)
|
||||
robot.backward()
|
||||
sleep(5)
|
||||
robot.right()
|
||||
sleep(1)
|
||||
robot.stop()
|
||||
sleep(1)
|
||||
```
|
||||
|
||||
[GPIO Zero docs](http://gpiozero.readthedocs.io/en/v1.3.1/api_boards.html#ryanteck-mcb-robot)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!--
|
||||
---
|
||||
name: Motor Kontrol Kartı
|
||||
name: RTK Motor Kontrol Kartı
|
||||
class: board
|
||||
type: hepsi
|
||||
formfactor: diğer
|
||||
|
@ -35,31 +35,22 @@ pin:
|
|||
|
||||
|
||||
```python
|
||||
##RTK-000-001 için basit bir motor scripti
|
||||
import RPi.GPIO as GPIO
|
||||
import time
|
||||
#Pinleri Broadcom Pin'lerine göre ayarlayalım
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
from gpiozero import RyanteckRobot
|
||||
from time import sleep
|
||||
|
||||
#Motor 1 = Pins 17 ve 18
|
||||
#Motor 2 = Pins 22 ve 23
|
||||
GPIO.setup(17, GPIO.OUT)
|
||||
GPIO.setup(18, GPIO.OUT)
|
||||
robot = RyanteckRobot()
|
||||
|
||||
#Şimdi de bir sonsuz döngü içinde motoru önce bir yöne, ve diğer yöne 5er saniye döndürelim:
|
||||
while (True):
|
||||
#1 saniye bekle, sonra pin 17'yi aç:
|
||||
GPIO.output(18, 0)
|
||||
time.sleep(1)
|
||||
GPIO.output(17, 1);
|
||||
#5 saniye bekle
|
||||
time.sleep(5);
|
||||
#Şimdi de diğer yöne doğrı
|
||||
GPIO.output(17, 0)
|
||||
time.sleep(1);
|
||||
GPIO.output(18, 1);
|
||||
time.sleep(5);
|
||||
#Döngüde burası başa dönecek
|
||||
#Son olarak GPIO'ları temizleme
|
||||
GPIO.cleanup()
|
||||
```
|
||||
while True:
|
||||
robot.forward()
|
||||
sleep(5)
|
||||
robot.left()
|
||||
sleep(1)
|
||||
robot.backward()
|
||||
sleep(5)
|
||||
robot.right()
|
||||
sleep(1)
|
||||
robot.stop()
|
||||
sleep(1)
|
||||
```
|
||||
|
||||
[GPIO Zero docs](http://gpiozero.readthedocs.io/en/v1.3.1/api_boards.html#ryanteck-mcb-robot)
|
||||
|
|
Loading…
Reference in New Issue