diff --git a/controller/python/controller.py b/controller/python/controller.py index 60750a8bddf7e6ef3d46c1b7a8b6fe1bfa960177..208f8bbbae96d97db9fc1ea129b130d51374d4c2 100644 --- a/controller/python/controller.py +++ b/controller/python/controller.py @@ -5,7 +5,6 @@ from typing import Any, Optional class Controller: - I2C_BUS = 8 I2C_ADDR = 0x57 WHO_AM_I = 0x0F @@ -14,7 +13,8 @@ class Controller: ENCODER_TICKS = 0x32 STATUS = 0x36 - def __init__(self): + def __init__(self, i2cbus=8): + self.I2C_BUS = i2cbus self.i2c = smbus.SMBus(self.I2C_BUS) def _read(self, command, n, unpack_spec) -> tuple: