Skip to content

Instantly share code, notes, and snippets.

@bennuttall
Created March 5, 2020 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bennuttall/837bf131e1f8c4500590a364e31c9156 to your computer and use it in GitHub Desktop.
Save bennuttall/837bf131e1f8c4500590a364e31c9156 to your computer and use it in GitHub Desktop.
from gpiozero import LEDBoard, Motor
class ExplorerHat:
def __init__(self, pwm=False):
self.leds = LEDBoard(blue=4, yellow=17, red=27, green=5,
_order=('blue', 'yellow', 'red', 'green'),
pwm=pwm
)
self.motor_1 = Motor(forward=20, backward=19)
self.motor_2 = Motor(forward=26, backward=21)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment