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

Feature: Add support for UART devices #493

Merged
merged 58 commits into from
Oct 2, 2023

Conversation

brentru
Copy link
Member

@brentru brentru commented Sep 19, 2023

This pull request adds initial WipperSnapper support for UART devices.

Technical notes:

  • Initial support for the PMS5003 Air Quality Sensor is included with this PR, with more sensors down the line
  • WipperSnapper defaults to using the hardware UART bus unless the BSP includes a copy of SoftwareSerial.

Implementation notes:

  • Unlike I2C, UART devices share a common period
  • Unlike I2C drivers, UART drivers publish data out to IO

Other notes:

  • Fixed: ESP32 platforms not connecting to IO-Staging Server

Tests:
Hardware UART

  • Create a UART device from Adafruit.io
  • Delete a UART device from Adafruit.io
  • Update a UART device's period from Adafruit.io
  • Update the number of a UART device's sensor "sub-components" from Adafruit.io
  • Verification that UART devices send data at a consistent period
  • Re-sync a UART device

Software UART

  • Create a UART device from Adafruit.io
  • Delete a UART device from Adafruit.io
  • Update a UART device's period from Adafruit.io
  • Update the number of a UART device's sensor "sub-components" from Adafruit.io
  • Verification that UART devices send data at a consistent period
  • Re-sync a UART device

Resolves #359

src/Wippersnapper.cpp Outdated Show resolved Hide resolved
src/Wippersnapper.cpp Outdated Show resolved Hide resolved
@brentru brentru marked this pull request as ready for review September 26, 2023 19:08
@brentru brentru requested a review from tyeth September 26, 2023 19:33
@brentru
Copy link
Member Author

brentru commented Sep 26, 2023

@tyeth Could you re-review this again at some point this week?

@brentru
Copy link
Member Author

brentru commented Sep 27, 2023

✅ Tested on hardware across all platforms except RP2040/PicoW due to WiFi issues
✅ Self-reviewed the PR

Copy link
Contributor

@tyeth tyeth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Driver name to pms5003 would be nice, but not fussed.

src/components/uart/drivers/ws_uart_drv_pm25aqi.h Outdated Show resolved Hide resolved
src/components/uart/ws_uart.cpp Outdated Show resolved Hide resolved
src/components/uart/ws_uart.cpp Show resolved Hide resolved
@brentru brentru merged commit bd8a96a into adafruit:main Oct 2, 2023
24 checks passed
@brentru brentru deleted the add-uart-feature branch October 2, 2023 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request uart
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support UART Air Quality Sensors
2 participants