We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d9e17c3 + a0e5d1a commit 537f288Copy full SHA for 537f288
adafruit_ad569x.py
@@ -33,6 +33,7 @@
33
34
"""
35
36
+import time
37
from micropython import const
38
from adafruit_bus_device.i2c_device import I2CDevice
39
@@ -190,8 +191,12 @@ def reset(self):
190
191
192
Soft-reset the AD569x chip.
193
- reset_command = 0x8000
194
+ buffer = bytearray([_WRITE_CONTROL, 0x80, 0x00])
195
try:
- self._send_command(_WRITE_CONTROL, reset_command)
196
- except Exception as error:
197
- raise Exception(f"Error during reset: {error}") from error
+ with self.i2c_device as i2c:
+ i2c.write(buffer, end=False)
198
+ except OSError:
199
+ pass
200
+ # print(f"Reset may have triggered a NAK, continuing..")
201
+ # stabilize after reset
202
+ time.sleep(0.01)
0 commit comments