Skip to content

Commit feef426

Browse files
authored
Firmware updater: use led matrix only on UNO R4 (#23)
1 parent dee101a commit feef426

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

examples/Utilities/FirmwareUpdater/FirmwareUpdater.ino

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
#if defined(ARDUINO_UNOWIFIR4)
12
#include "ArduinoGraphics.h"
23
#include "Arduino_LED_Matrix.h"
4+
#endif
35

46
#include "Modulino.h"
57
#include "Wire.h"
@@ -20,11 +22,14 @@ void setup() {
2022
}
2123

2224
auto result = flash(node_base_bin, node_base_bin_len);
25+
26+
#if defined(ARDUINO_UNOWIFIR4)
2327
if (result) {
2428
matrixInitAndDraw("PASS");
2529
} else {
2630
matrixInitAndDraw("FAIL");
2731
}
32+
#endif
2833
}
2934

3035
void loop() {
@@ -53,6 +58,7 @@ class SerialVerbose {
5358
bool _verbose;
5459
};
5560

61+
#if defined(ARDUINO_UNOWIFIR4)
5662
ArduinoLEDMatrix matrix;
5763

5864
void matrixInitAndDraw(char* text) {
@@ -67,6 +73,7 @@ void matrixInitAndDraw(char* text) {
6773

6874
matrix.endDraw();
6975
}
76+
#endif
7077

7178
bool flash(const uint8_t* binary, size_t lenght, bool verbose) {
7279

0 commit comments

Comments
 (0)