Skip to content

Add support for AVR boards in UNIT_4RELAY::begin#4

Open
m0spak wants to merge 1 commit intom5stack:masterfrom
m0spak:add-avr-board-support
Open

Add support for AVR boards in UNIT_4RELAY::begin#4
m0spak wants to merge 1 commit intom5stack:masterfrom
m0spak:add-avr-board-support

Conversation

@m0spak
Copy link
Copy Markdown

@m0spak m0spak commented Mar 2, 2026

This change adds compatibility with AVR-based Arduino boards,
including classic boards such as UNO, Nano, and Mega.

The original implementation calls:

Wire.begin(sda, scl, freq)

However, the AVR Wire library does not support passing SDA/SCL
pins to begin(); it only supports:

Wire.begin()

This update conditionally calls Wire.begin() on AVR platforms,
while keeping the original behavior for all other boards
(ESP32, ESP8266, RP2040, etc.).

Supporting AVR boards improves portability and allows the library
to be used across a wider range of Arduino boards in the community.

@imliubo imliubo requested a review from TinyuZhao March 16, 2026 04:27
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.

1 participant