We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 18e6ea7 + ace73c3 commit 1905c10Copy full SHA for 1905c10
PMS5003_Air_Quality_Sensor/PMS5003_CircuitPython/main.py renamed to PMS5003_Air_Quality_Sensor/PMS5003_CircuitPython/code.py
@@ -1,18 +1,18 @@
1
-import board
2
-import busio
3
-from digitalio import DigitalInOut, Direction
4
-
5
try:
6
import struct
7
except ImportError:
8
import ustruct as struct
9
10
-led = DigitalInOut(board.D13)
11
-led.direction = Direction.OUTPUT
12
13
-# Connect the Sensor's TX pin to the board's RX pin
+# Connect the sensor TX pin to the board/computer RX pin
+# For use with a microcontroller board:
+import board
+import busio
14
uart = busio.UART(board.TX, board.RX, baudrate=9600)
15
+# For use with Raspberry Pi/Linux:
+# import serial
+# uart = serial.Serial("/dev/ttyS0", baudrate=9600, timeout=0.25)
+
16
buffer = []
17
18
while True:
0 commit comments