Skip to content

[API v1]: Add support for I2C Output Components #751

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

brentru
Copy link
Member

@brentru brentru commented May 15, 2025

This pull request enhances core I2C functionality by adding support for I2C output devices. This is a backport of #749 to work with the v1 WipperSnapper Protocol Buffer API.

The following I2C Output Devices are supported by this pull request:

  • 7-Segment LED numeric matrix with Adafruit I2C backpack (HT16K33)
  • 14-Segment LED alphanumeric display with Adafruit I2C backpack (HT16K33)
  • Character Displays with "i2c / SPI character LCD backpack - STEMMA QT / Qwiic"

Addresses: adafruit/Wippersnapper_Protobuf#144
Resolves: #742

Full Diff (Automatically Generated using Copilot Summary)

Support for New I2C Output Devices:

  • Added support for LED backpacks and character LCDs by introducing new driver classes: WipperSnapper_I2C_Driver_Out, WipperSnapper_I2C_Driver_Out_QuadAlphaNum, and WipperSnapper_I2C_Driver_Out_CharLcd. These classes encapsulate the functionality required to interact with these devices. (src/components/i2c/drivers/WipperSnapper_I2C_Driver_Out.h, src/components/i2c/drivers/WipperSnapper_I2C_Driver_Out_CharLcd.h) [1] [2]

Updates to I2C Initialization and Deinitialization:

  • Modified initI2CDevice to initialize the new output devices (quadalphanum and charlcd) with specific configurations such as brightness and alignment for LED backpacks and row/column setup for character LCDs. (src/components/i2c/WipperSnapper_I2C.cpp)
  • Enhanced deinitI2CDevice to properly handle the removal of output drivers, ensuring compatibility with both ESP-IDF and Arduino architectures. (src/components/i2c/WipperSnapper_I2C.cpp)

Handling I2C Output Operations:

  • Added Handle_I2cDeviceOutputWrite to process messages for output devices, including writing text or numeric values to LED backpacks and character LCDs. (src/components/i2c/WipperSnapper_I2C.cpp, src/components/i2c/WipperSnapper_I2C.h) [1] [2]

Dependency Updates:

  • Updated library.properties and platformio.ini to include new dependencies for the Adafruit LED Backpack and LiquidCrystal libraries, ensuring the required libraries are available for the new functionality. (library.properties, platformio.ini) [1] [2]

Debugging and Logging:

  • Added detailed debug messages to aid in tracking the initialization, deinitialization, and operation of I2C output devices. (src/Wippersnapper.cpp, src/components/i2c/WipperSnapper_I2C.cpp) [1] [2]

These changes significantly expand the WipperSnapper framework's capabilities, enabling support for a broader range of I2C devices and improving the overall robustness of the I2C handling logic.

@brentru brentru requested a review from tyeth May 15, 2025 18:32
@brentru brentru marked this pull request as ready for review May 15, 2025 18:50
Comment on lines +94 to +95
https://github.com/adafruit/Adafruit_LED_Backpack.git
https://github.com/adafruit/Adafruit_PM25AQI.git
Copy link
Contributor

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Support for I2C Output Components
2 participants