import time from pms5003 import PMS5003 from pms5003 import PMS5003Data from pms5003 import PMS5003Response import machine print("""pms5003_test.py - Continously print all data values. """) # Configure the PMS5003 for Enviro+ pms5003 = PMS5003( uart=machine.UART(1, tx=machine.Pin(16), rx=machine.Pin(17), baudrate=9600), pin_enable=machine.Pin(3), pin_reset=machine.Pin(2), mode="active" ) while True: data = pms5003.read() #print(data) variable1 = data.pm_ug_per_m3(2.5) variable2 = data.pm_ug_per_m3(1) # Plotting two variables print("PM25",variable1,"PM1",variable2) time.sleep(1.0)