Closed
Description
If you leave python script while measuring the MLX90393 a power-on reset is needed to communicate again with the MLX90393.
For avoid that i just put before the reset command the exit command.
see page 23 in MLX90393-Datasheet-Melexis-953267.pdf
" It is recommended to perform an ‘EX’ command before issuing a ‘RT’ command"
here my implementation
def reset(self) -> None:
"""
Performs a software reset of the sensor.
"""
self.exitMode()
if self._debug:
print("Resetting sensor")
time.sleep(2)
self._transceive(bytes([_CMD_RT]))
# burn a read post reset
try:
self.magnetic
except OSError:
pass
return self._status_last
def exitMode(self) -> None:
"""
Performs a Exit to cancel a measurement.
"""
if self._debug:
print("Exit mode")
self._transceive(bytes([_CMD_EX]))
return self._status_last
Metadata
Metadata
Assignees
Labels
No labels