Added test, fixed typo

This commit is contained in:
Conr86
2019-06-22 17:15:44 +10:00
parent 75457cdad8
commit e7cb94e364
3 changed files with 63 additions and 49 deletions

11
test.py Normal file
View File

@@ -0,0 +1,11 @@
from smbus2 import SMBusWrapper
from sgp30 import Sgp30
import time
with SMBusWrapper(1) as bus:
sgp=Sgp30(bus)
print("resetting all i2c devices")
sgp.i2c_geral_call()
print(sgp.read_features())
print(sgp.read_serial())
sgp.init_sgp()
print(sgp.read_measurements())