Added some defaults to TMP117

This commit is contained in:
Oliver Cullis 2024-09-25 13:31:01 +02:00
parent 8bc2183739
commit c6bcdb5088
2 changed files with 8 additions and 3 deletions

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
__pycache__
.micropico .micropico
.vscode .vscode
global_config.json
global_config.json

View File

@ -27,9 +27,13 @@ class TMP117:
"Soft_Reset": 1, "Soft_Reset": 1,
"--": 0 "--": 0
} }
DEFAULT_CONFIG_INT = 554
def __init__(self, name: str, i2c: machine.I2C|machine.SoftI2C, i2c_addr, config_int): def __init__(
self,
name: str,
i2c: machine.I2C|machine.SoftI2C,
i2c_addr: int = 72,
config_int: int = 544):
self.name = name self.name = name
self.i2c_addr = i2c_addr self.i2c_addr = i2c_addr
self.i2c = i2c self.i2c = i2c