working motor with old pin system
This commit is contained in:
@@ -7,7 +7,7 @@ MIN = 550
|
|||||||
MAX = 2450
|
MAX = 2450
|
||||||
CHANNELS = 16
|
CHANNELS = 16
|
||||||
|
|
||||||
kit = ServoKit(channels=CHANNELS, frequency=49)
|
kit = ServoKit(channels=CHANNELS, frequency=50)
|
||||||
|
|
||||||
for i in range(CHANNELS):
|
for i in range(CHANNELS):
|
||||||
kit.servo[i].angle = 0
|
kit.servo[i].angle = 0
|
||||||
|
|||||||
6
motor.py
6
motor.py
@@ -1,5 +1,11 @@
|
|||||||
"""Helpers for building moving mirrors."""
|
"""Helpers for building moving mirrors."""
|
||||||
|
|
||||||
|
from adafruit_servokit import ServoKit
|
||||||
|
|
||||||
|
class Board:
|
||||||
|
def __init__(self, channels=16, frequency=50):
|
||||||
|
self.kit = ServoKit(channels=channels, frequency=frequency)
|
||||||
|
|
||||||
class Motor:
|
class Motor:
|
||||||
"""Model a type of servo motor."""
|
"""Model a type of servo motor."""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user