Skip to content

Instantly share code, notes, and snippets.

@bennuttall
Last active May 2, 2017 01:46
Show Gist options
  • Save bennuttall/20ab5f93c5f830276fdae3bf1d74cb94 to your computer and use it in GitHub Desktop.
Save bennuttall/20ab5f93c5f830276fdae3bf1d74cb94 to your computer and use it in GitHub Desktop.
from gpiozero import Motor, OutputDevice
from time import sleep
motor1 = Motor(24, 27)
motor1_enable = OutputDevice(5, initial_value=1)
motor2 = Motor(6, 22)
motor2_enable = OutputDevice(17, initial_value=1)
motor3 = Motor(23, 16)
motor3_enable = OutputDevice(12, initial_value=1)
motor4 = Motor(13, 18)
motor4_enable = OutputDevice(25, initial_value=1)
motors = (motor1, motor2, motor3, motor4)
for motor in motors:
motor.forward()
sleep(1)
motor.stop()
@avasino
Copy link

avasino commented Mar 7, 2017

I tried to to have control using kbhit.py but it seems pizero is not enough powerfull

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment