diff --git a/sgp30/__init__.py b/sgp30/__init__.py index 3e9f28f..9a1355f 100644 --- a/sgp30/__init__.py +++ b/sgp30/__init__.py @@ -1,2 +1,2 @@ -from .sgp30 import Sgp30 +from .sgp30 import SGP30 from .crc import Crc8 diff --git a/test.py b/test.py index cc26a40..2c0c6f5 100644 --- a/test.py +++ b/test.py @@ -1,11 +1,14 @@ from smbus2 import SMBusWrapper -from sgp30 import Sgp30 +from sgp30 import SGP30 import time with SMBusWrapper(1) as bus: - sgp=Sgp30(bus) + sgp = SGP30(bus) print("resetting all i2c devices") - sgp.i2c_geral_call() + sgp.i2c_general_call() print(sgp.read_features()) print(sgp.read_serial()) sgp.init_sgp() - print(sgp.read_measurements()) \ No newline at end of file + for i in range(300): + print(sgp.read_measurements()) + time.sleep(0.1) + sgp.store_baseline()