import time
time.sleep(0.1) # Wait for USB to become ready
print("Hello, Pi Pico W!")
from Sensors_advanced import *
g = GasSensor(pin=26)
d = DHTSensor(pin=3, sensor_type='DHT22')
while True:
conc = g.getGasConcentrations()
print(conc)
dhtdata = d.rawValue()
print(dhtdata)
# If you want the data separately:
# Note that the gas sensor returns a dictionary
# and the dht returns a tuple so use a numeric index for the tuple
print(f"Smoke: {conc['Smoke']}")
print(f"Temperature: {dhtdata[0]}")