Add servo inheritance hierarchy to motor control

This commit is contained in:
Piv
2019-07-17 18:51:03 +09:30
parent b1ff1386f5
commit baffd0bbb1
3 changed files with 65 additions and 16 deletions

19
MotorControl/servo.py Normal file
View File

@@ -0,0 +1,19 @@
from abc import ABC, abstractmethod
"""
This module provides a base class for interacting with servo-like code.
"""
class Servo(ABC):
@property
@abstractmethod
def percent(self):
pass
@percent.setter
@abstractmethod
def percent(self, forward):
pass