14 lines
251 B
Python
14 lines
251 B
Python
from machine import Pin, I2C
|
|
import uSGP30
|
|
|
|
i2c = I2C(0, scl = Pin(9), sda = Pin(8), freq = 400000)
|
|
|
|
SGP30_addr = 0x58;
|
|
|
|
# sgp30 = uSGP30.SGP30(i2c, SGP30_addr);
|
|
|
|
sgp30 = uSGP30.SGP30(i2c)
|
|
|
|
t_CO2, t_COV = sgp30.measure_iaq()
|
|
|
|
print(t_CO2) |