Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: try to use auto-detect for pins first. #24

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion examples/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
# Configure the PMS5003 for Enviro+
# pins and ports may vary for your hardware!

# Default, try to auto-detect platform
pms5003 = PMS5003(device="/dev/ttyAMA0", baudrate=9600)

# Raspberry Pi 4 (Raspberry Pi OS)
# GPIO22 and GPIO27 are enable and reset for Raspberry Pi 4
# use "raspi-config" to enable serial, or add
Expand All @@ -24,7 +27,7 @@
# PIN15 and PIN13 are enable and reset for Raspberry Pi 5
# use "raspi-config" to enable serial, or add
# "dtoverlay=uart0-pi5" to /boot/firmware/config.txt
pms5003 = PMS5003(device="/dev/ttyAMA0", baudrate=9600, pin_enable="PIN15", pin_reset="PIN13")
# pms5003 = PMS5003(device="/dev/ttyAMA0", baudrate=9600, pin_enable="PIN15", pin_reset="PIN13")

# ROCK 5B
# Use "armbian-config" to enable rk3568-uart2-m0
Expand Down
5 changes: 4 additions & 1 deletion examples/specific.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# Configure the PMS5003 for Enviro+
# pins and ports may vary for your hardware!

# Default, try to auto-detect platform
pms5003 = PMS5003(device="/dev/ttyAMA0", baudrate=9600)

# Raspberry Pi 4 (Raspberry Pi OS)
# GPIO22 and GPIO27 are enable and reset for Raspberry Pi 4
# use "raspi-config" to enable serial, or add
Expand All @@ -23,7 +26,7 @@
# PIN15 and PIN13 are enable and reset for Raspberry Pi 5
# use "raspi-config" to enable serial, or add
# "dtoverlay=uart0-pi5" to /boot/firmware/config.txt
pms5003 = PMS5003(device="/dev/ttyAMA0", baudrate=9600, pin_enable="PIN15", pin_reset="PIN13")
# pms5003 = PMS5003(device="/dev/ttyAMA0", baudrate=9600, pin_enable="PIN15", pin_reset="PIN13")

# ROCK 5B
# Use "armbian-config" to enable rk3568-uart2-m0
Expand Down
Loading