add new hal for double H bridge stepper motor driver

This commit is contained in:
sinseman44 committed 2020-09-12 23:19:18 +01:00
1 parent de2b01cbcb
commit ea9db33b19
7 files changed
+401 -52

No files matched your search

+2
View File
@@ -13,6 +13,8 @@ class __I2CDev(object):
def __init__(self):
self._os_close = os.close
# Initialize i2c interface and register it for closing on exit.
if not os.path.isfile("/dev/i2c-1"):
raise ImportError("i2c not configured")
self._dev = os.open("/dev/i2c-1", os.O_SYNC | os.O_RDWR)
if self._dev < 0:
raise ImportError("i2c device not found")