Skip to content

Commit

Permalink
Read infinitely in dry run
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminwp18 committed Jun 1, 2024
1 parent 1a5a10e commit bbda4dd
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/pi/temp_sensor/temp_sensor/temp_sensor_dry_run.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
import tsys01
# https://github.com/bluerobotics/tsys01-python
from time import sleep

import tsys01 # https://github.com/bluerobotics/tsys01-python


def debug_log() -> None:
sensor = tsys01.TSYS01() # Use default I2C bus 1

sensor.init()

sensor.read()

sensor.temperature() # Get temperature in default units (Centigrade)
while True:
sensor.read()
print(
sensor.temperature(), # Get temperature in default units (Centigrade)
'\t',
sensor.temperature(tsys01.UNITS_Farenheit)
)
sleep(1)


if __name__ == "__main__":
Expand Down

0 comments on commit bbda4dd

Please sign in to comment.