From 7bd18d09aca8a2e1f8594967025cb8aac4202a3e Mon Sep 17 00:00:00 2001 From: Dlr Rpi Date: Thu, 6 Nov 2025 15:04:16 +0100 Subject: [PATCH] working motor with old pin system --- driver.py | 2 +- motor.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/driver.py b/driver.py index 7b594b9..bc8bac7 100644 --- a/driver.py +++ b/driver.py @@ -7,7 +7,7 @@ MIN = 550 MAX = 2450 CHANNELS = 16 -kit = ServoKit(channels=CHANNELS, frequency=49) +kit = ServoKit(channels=CHANNELS, frequency=50) for i in range(CHANNELS): kit.servo[i].angle = 0 diff --git a/motor.py b/motor.py index e1301e9..b9dd71b 100644 --- a/motor.py +++ b/motor.py @@ -1,5 +1,11 @@ """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: """Model a type of servo motor."""