try:
self._handle = pi.i2c_open(1, self.conf['address'])
except pigpio.error as e:
- print(e)
+ print(f"OutputCard at '{self.conf['address']}': {e}")
return
try:
byte = pi.i2c_read_byte(self._handle)
except pigpio.error as e:
- print(e)
+ print(f"OutputCard at '{self.conf['address']}': {e}")
byte = 0
self._pins2states: Dict[int, bool] = {}
self._pins2clients: Dict[int, List[str]] = {}
pi.i2c_write_byte(self._handle, byte)
byte = pi.i2c_read_byte(self._handle)
except pigpio.error as e:
- print(e)
+ print(f"OutputCard at '{self.conf['address']}': {e}")
return
# Send changed events for all changed clients:
for pin in range(0, 8):
try:
self._handle = pi.i2c_open(1, self.conf['address'])
except pigpio.error as e:
- print(e)
+ print(f"InputCard at '{self.conf['address']}': {e}")
return
try:
byte = pi.i2c_read_byte(self._handle)
except pigpio.error as e:
- print(e)
+ print(f"InputCard at '{self.conf['address']}': {e}")
byte = 0
self._pins2states: Dict[int, bool] = {}
self._pins2clients: Dict[int, List[str]] = {}
try:
byte = pi.i2c_read_byte(self._handle)
except pigpio.error as e:
- print(e)
+ print(f"InputCard at '{self.conf['address']}': {e}")
return
# Send changed events for all changed clients:
for pin in range(0, 8):