Skip to content

Commit

Permalink
Merge pull request #125 from davet2001/support_temperhumiv1_0
Browse files Browse the repository at this point in the history
Support TEMPerHumiV1.0
  • Loading branch information
davet2001 authored Apr 21, 2022
2 parents 0076487 + 9ce631b commit ee3c839
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions temperusb/device_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ def __init__(
hum_sens_offsets=[4],
type=TemperType.SI7021,
),
"TEMPerHumiV1.0": TemperConfig(
temp_sens_offsets=[2],
hum_sens_offsets=[4],
type=TemperType.FM75,
),
"TEMPerHumiV1.1": TemperConfig(
temp_sens_offsets=[2],
hum_sens_offsets=[4],
Expand Down
10 changes: 10 additions & 0 deletions tests/test_temper.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@
[12.3],
[87.6],
],
[
"TEMPerHumiV1.0",
0x0C45,
0x7401,
1,
b"\x01\x80\x33\x01\x00\x00\x00\x00",
b"\x00\x00\x20\x1A\x0C\x0C", # 0x201A,0x0C0C converts to 32.1C,98.7% (fm75)
[32.1],
[98.7],
],
[
"TEMPerHumiV1.1",
0x0C45,
Expand Down

0 comments on commit ee3c839

Please sign in to comment.