Changed structure
This commit is contained in:
12
board.py
Normal file
12
board.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from adafruit_servokit import ServoKit
|
||||
|
||||
class Board:
|
||||
def __init__(self, channels=16, frequency=50):
|
||||
self.channels = channels
|
||||
self.frequency = frequency
|
||||
self.kit = ServoKit(channels=channels, frequency=frequency)
|
||||
|
||||
for i in range(CHANNELS):
|
||||
kit.servo[i].set_pulse_width_range(MIN, MAX)
|
||||
kit.servo[i].actuation_range = RANGE
|
||||
kit.servo[i].angle = INIT
|
||||
Reference in New Issue
Block a user