Fixed test
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
from .sgp30 import Sgp30
|
||||
from .sgp30 import SGP30
|
||||
from .crc import Crc8
|
||||
|
11
test.py
11
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())
|
||||
for i in range(300):
|
||||
print(sgp.read_measurements())
|
||||
time.sleep(0.1)
|
||||
sgp.store_baseline()
|
||||
|
Reference in New Issue
Block a user