Skip to content

Commit

Permalink
Power off HX711 immediately after reading the sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
thiasB committed Mar 31, 2020
1 parent c71bcc1 commit 60b8dd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/terkin/datalogger.py
Expand Up @@ -473,6 +473,10 @@ def read_sensors(self) -> DataFrame:
with gc_disabled():
sensor_data = sensor.read()

# Power off HX711 after reading
if "HX711Sensor" in sensorname:
sensor.power_off()

# Evaluate sensor outcome.
if sensor_data is None or sensor_data is AbstractSensor.SENSOR_NOT_INITIALIZED:
continue
Expand Down

0 comments on commit 60b8dd8

Please sign in to comment.