Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
dido18 authored Mar 5, 2025
2 parents be31726 + d5de8d9 commit fa46b13
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions examples/Utilities/FirmwareUpdater/FirmwareUpdater.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#if defined(ARDUINO_UNOWIFIR4)
#include "ArduinoGraphics.h"
#include "Arduino_LED_Matrix.h"
#endif

#include "Modulino.h"
#include "Wire.h"
Expand All @@ -20,11 +22,14 @@ void setup() {
}

auto result = flash(node_base_bin, node_base_bin_len);

#if defined(ARDUINO_UNOWIFIR4)
if (result) {
matrixInitAndDraw("PASS");
} else {
matrixInitAndDraw("FAIL");
}
#endif
}

void loop() {
Expand Down Expand Up @@ -53,6 +58,7 @@ class SerialVerbose {
bool _verbose;
};

#if defined(ARDUINO_UNOWIFIR4)
ArduinoLEDMatrix matrix;

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

matrix.endDraw();
}
#endif

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

Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Arduino_Modulino
version=0.4.2
version=0.4.3
author=Arduino
maintainer=Arduino <info@arduino.cc>
sentence=Arduino Library for Modulinos
Expand Down
6 changes: 6 additions & 0 deletions src/Modulino.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ class ModulinoMovement : public Module {
}
return 0;
}
int available() {
if (initialized) {
return _imu->accelerationAvailable();
}
return 0;
}
float getX() {
return x;
}
Expand Down

0 comments on commit fa46b13

Please sign in to comment.