Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: UnoQ support for I2C priority function #42

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

Merged
facchinm merged 1 commit into arduino-libraries:main from dido18:fix-increase-priority-unoq
Oct 16, 2025

Conversation

@dido18
Copy link
Contributor

@dido18 dido18 commented Oct 16, 2025
edited
Loading

Motivation

Fix compilation failure for UnoQ when both Modulino and Arduino_LED_Matrix libraries are included.

How to reproduce

  • Modulino 0.6.0
  • arduino:zephyr 0.51.0

Example sketch that triggers the error:

#include <Modulino.h>
#include "Arduino_LED_Matrix.h"
void setup() {
 Modulino.begin();
}
void loop() {}

Error

/home/arduino/.cache/arduino/sketches/01A8778A6FDBF10D480441898938F9AD/sketch/sketch.ino.cpp.o: in function `ModulinoClass::begin(arduino::HardwareI2C&)':
/home/arduino/ArduinoApps/scratch-arduino-app/sketch/Arduino_Modulino/src/Modulino.h:46: undefined reference to `__increaseI2CPriority()'
collect2: error: ld returned 1 exit status

Root Cause

Modulino.cpp incorrectly handles the conditional logic for defining __increaseI2CPriority.
When Arduino_LED_Matrix.h is included but ARDUINO_UNOR4_WIFI is not defined (e.g., compiling for UnoQ), neither branch provides a definition for the function, resulting in an undefined reference.

Fix

Ensure that there is always at least one definition of __increaseI2CPriority. If UnoQ the void definition is added.

facchinm reacted with thumbs up emoji
@per1234 per1234 added the bug Something isn't working label Oct 16, 2025
Copy link
Contributor Author

dido18 commented Oct 16, 2025
edited
Loading

Tested on UNOQ

#include <Modulino.h>
#include "Arduino_LED_Matrix.h"
Arduino_LED_Matrix matrix;
ModulinoButtons buttons;
uint8_t shades[104] = {
	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	
	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,
	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,
	3,	3,	3,	3,	3,	3,	3,	3,	3,	3,	3,	3,	3,
	4,	4,	4,	4,	4,	4,	4,	4,	4,	4,	4,	4,	4,
	5,	5,	5,	5,	5,	5,	5,	5,	5,	5,	5,	5,	5,
	6,	6,	6,	6,	6,	6,	6,	6,	6,	6,	6,	6,	6,
	7,	7,	7,	7,	7,	7,	7,	7,	7,	7,	7,	7,	7,
};
void setup() {
 Modulino.begin(Wire1);
 buttons.begin();
 matrix.begin();
}
void loop() {
 if (buttons.update()) {
 if (buttons.isPressed('A')) {
 matrix.clear();
 }
 if (buttons.isPressed('B')) {
 matrix.draw(shades);
 }
 }
}

Copy link
Contributor Author

dido18 commented Oct 16, 2025
edited
Loading

Tested on UNO R4 with this sketch

#include "Arduino_LED_Matrix.h" // Include the LED_Matrix library
#include "frames.h" // Include a header file containing some custom icons
#include <Modulino.h>
ModulinoButtons buttons;
ArduinoLEDMatrix matrix; // Create an instance of the ArduinoLEDMatrix class
void setup() {
 Serial.begin(115200); // Initialize serial communication at a baud rate of 115200
 matrix.begin(); // Initialize the LED matrix
 Modulino.begin();
 buttons.begin();
}
void loop() {
 if (buttons.update()) {
 if (buttons.isPressed('A')) {
 matrix.loadFrame(LEDMATRIX_HEART_BIG);
 } else if (buttons.isPressed("B")) {
 matrix.clear();
 }
 }
}

@dido18 dido18 marked this pull request as ready for review October 16, 2025 08:06
@facchinm facchinm merged commit 480e9d1 into arduino-libraries:main Oct 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

bug Something isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /