File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1616# reset_pin.value = False
1717
1818
19- # If using with a computer such as Linux/RaspberryPi, Mac, Windows...
19+ # For use with a computer running Windows:
2020# import serial
21- #
2221# uart = serial.Serial("COM30", baudrate=9600, timeout=1)
22+
23+ # For use with microcontroller board:
24+ # (Connect the sensor TX pin to the board/computer RX pin)
25+ # uart = busio.UART(board.TX, board.RX, baudrate=9600)
26+
27+ # For use with Raspberry Pi/Linux:
28+ # import serial
29+ # uart = serial.Serial("/dev/ttyS0", baudrate=9600, timeout=0.25)
30+
31+ # For use with USB-to-serial cable:
32+ # import serial
33+ # uart = serial.Serial("/dev/ttyUSB0", baudrate=9600, timeout=0.25)
34+
2335# Connect to a PM2.5 sensor over UART
2436# pm25 = adafruit_pm25.PM25_UART(uart, reset_pin)
2537
26-
2738# Create library object, use 'slow' 100KHz frequency!
2839i2c = busio .I2C (board .SCL , board .SDA , frequency = 100000 )
2940# Connect to a PM2.5 sensor over I2C
You can’t perform that action at this time.
0 commit comments