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 16
16
# reset_pin.value = False
17
17
18
18
19
- # If using with a computer such as Linux/RaspberryPi, Mac, Windows...
19
+ # For use with a computer running Windows:
20
20
# import serial
21
- #
22
21
# 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
+
23
35
# Connect to a PM2.5 sensor over UART
24
36
# pm25 = adafruit_pm25.PM25_UART(uart, reset_pin)
25
37
26
-
27
38
# Create library object, use 'slow' 100KHz frequency!
28
39
i2c = busio .I2C (board .SCL , board .SDA , frequency = 100000 )
29
40
# Connect to a PM2.5 sensor over I2C
You can’t perform that action at this time.
0 commit comments