Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: arduino-libraries/Modulino
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.4.2
Choose a base ref
...
head repository: arduino-libraries/Modulino
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.4.3
Choose a head ref
  • 12 commits
  • 3 files changed
  • 9 contributors

Commits on Oct 3, 2024

  1. removed compilation warnings

    maidnl committed Oct 3, 2024
    Copy the full SHA
    47828b2 View commit details
  2. Merge pull request #13 from maidnl/removing_warnings

    Modulino:removed compilation warnings
    maidnl authored Oct 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    485e3d2 View commit details

Commits on Nov 4, 2024

  1. Add ArduinoGraphics as a library dependency

    seaxwi committed Nov 4, 2024
    Copy the full SHA
    8bf8495 View commit details

Commits on Nov 12, 2024

  1. Add #include guard around Modulino.h

    My project currently cannot include modulino.h from two source files. An include guard could resolve this issue.
    EliTayrien authored Nov 12, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e5f48a6 View commit details

Commits on Jan 21, 2025

  1. Merge pull request #15 from seaxwi/arduinographics-dependency

    Add ArduinoGraphics as a library dependency
    facchinm authored Jan 21, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    cf5e2b2 View commit details

Commits on Feb 6, 2025

  1. Fix on begin() addr check Modulino.h

    d-le0 authored Feb 6, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f3ce8fd View commit details
  2. Merge pull request #17 from EliTayrien/patch-1

    Add #include guard around Modulino.h
    facchinm authored Feb 6, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f0c3eaa View commit details
  3. Merge pull request #21 from d-le0/main

    Fix on begin() addr check Modulino.h
    facchinm authored Feb 6, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    dee101a View commit details

Commits on Feb 17, 2025

  1. Firmware updater: use led matrix only on UNO R4 (#23)

    marqdevx authored Feb 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    feef426 View commit details

Commits on Feb 20, 2025

  1. add available() function for Modulino Movement (query if new accelera…

    …tion data from the modulino is available)
    leonardocavagnis committed Feb 20, 2025
    Copy the full SHA
    610427b View commit details
  2. Merge pull request #24 from leonardocavagnis/modulino-movement-available

    add `available()` function for Modulino Movement
    leonardocavagnis authored Feb 20, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    550e612 View commit details

Commits on Mar 4, 2025

  1. Bump the library version to 0.4.3

    leonardocavagnis authored Mar 4, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    d5de8d9 View commit details
Showing with 30 additions and 11 deletions.
  1. +7 −0 examples/Utilities/FirmwareUpdater/FirmwareUpdater.ino
  2. +2 −2 library.properties
  3. +21 −9 src/Modulino.h
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"
@@ -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() {
@@ -53,6 +58,7 @@ class SerialVerbose {
bool _verbose;
};

#if defined(ARDUINO_UNOWIFIR4)
ArduinoLEDMatrix matrix;

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

matrix.endDraw();
}
#endif

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

4 changes: 2 additions & 2 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Modulino
version=0.4.2
version=0.4.3
author=Arduino
maintainer=Arduino <info@arduino.cc>
sentence=Arduino Library for Modulinos
@@ -8,4 +8,4 @@ category=Communication
url=https://github.com/arduino-libraries/Modulino
architectures=*
includes=Modulino.h
depends=STM32duino VL53L4CD,STM32duino VL53L4ED,Arduino_LSM6DSOX,Arduino_LPS22HB,Arduino_HS300x
depends=STM32duino VL53L4CD,STM32duino VL53L4ED,Arduino_LSM6DSOX,Arduino_LPS22HB,Arduino_HS300x,ArduinoGraphics
30 changes: 21 additions & 9 deletions src/Modulino.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef ARDUINO_LIBRARIES_MODULINO_H
#define ARDUINO_LIBRARIES_MODULINO_H

// Copyright (c) 2024 Arduino SA
// SPDX-License-Identifier: MPL-2.0

@@ -46,10 +49,11 @@ extern ModulinoClass Modulino;

class Module : public Printable {
public:
Module(uint8_t address = 0xFF, char* name = "")
: address(address), name(name) {}
Module(uint8_t address = 0xFF, const char* name = "")
: address(address), name((char *)name) {}
virtual ~Module() {}
bool begin() {
if (address == 0xFF) {
if (address >= 0x7F) {
address = discover() / 2; // divide by 2 to match address in fw main.c
}
return (address < 0x7F);
@@ -141,7 +145,7 @@ class ModulinoButtons : public Module {
return;
}
virtual uint8_t discover() {
for (int i = 0; i < sizeof(match)/sizeof(match[0]); i++) {
for (unsigned int i = 0; i < sizeof(match)/sizeof(match[0]); i++) {
if (scan(match[i])) {
return match[i];
}
@@ -170,7 +174,7 @@ class ModulinoBuzzer : public Module {
write(buf, 8);
}
virtual uint8_t discover() {
for (int i = 0; i < sizeof(match)/sizeof(match[0]); i++) {
for (unsigned int i = 0; i < sizeof(match)/sizeof(match[0]); i++) {
if (scan(match[i])) {
return match[i];
}
@@ -217,7 +221,7 @@ class ModulinoPixels : public Module {
write((uint8_t*)data, NUMLEDS * 4);
}
virtual uint8_t discover() {
for (int i = 0; i < sizeof(match)/sizeof(match[0]); i++) {
for (unsigned int i = 0; i < sizeof(match)/sizeof(match[0]); i++) {
if (scan(match[i])) {
return match[i];
}
@@ -274,7 +278,7 @@ class ModulinoKnob : public Module {
return _pressed;
}
virtual uint8_t discover() {
for (int i = 0; i < sizeof(match)/sizeof(match[0]); i++) {
for (unsigned int i = 0; i < sizeof(match)/sizeof(match[0]); i++) {
if (scan(match[i])) {
return match[i];
}
@@ -313,6 +317,12 @@ class ModulinoMovement : public Module {
}
return 0;
}
int available() {
if (initialized) {
return _imu->accelerationAvailable();
}
return 0;
}
float getX() {
return x;
}
@@ -480,7 +490,7 @@ class ModulinoDistance : public Module {
if (api == nullptr) {
return false;
}
float ret = internal;

uint8_t NewDataReady = 0;
api->checkForDataReady(&NewDataReady);
if (NewDataReady) {
@@ -504,4 +514,6 @@ class ModulinoDistance : public Module {
//VL53L4ED_ResultsData_t results;
float internal = NAN;
_distance_api* api = nullptr;
};
};

#endif