Refactor reset method

This commit is contained in:
Floor Roth 2022-10-04 20:44:18 +02:00 committed by flrrth
parent 72aac5cff7
commit 8a8600969d

View file

@ -26,9 +26,7 @@ class HTU21D:
def reset(self):
"""Reset the HTU21D."""
txdata = bytearray(1)
txdata[0] = 0xFE
self._i2c.writeto(self._address, txdata)
self._i2c.writeto(self._address, b'\xFE')
sleep_ms(15)
@property