mirror of
https://github.com/sinseman44/PyCNC.git
synced 2026-07-16 08:37:09 +00:00
add new hal for double H bridge stepper motor driver
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user