Modulino Distance not working: Is anyone else having issues with the Modulino Distance sensor?

I've tried using the Example code in the libraries here:

#include "Modulino.h"

ModulinoDistance distance;

void setup() {
  Serial.begin(9600);
  Modulino.begin();
  distance.begin();
}

void loop() {
  if (distance.available()) {
    int measure = distance.get();
    Serial.println(measure);
  }
  delay(10);
}```



and I'm not getting anything over Serial Monitor. The board's green LEDs light up so it seems the board is working. I did some modification later to the code so I can debug here:


void loop() {
  Serial.println("Checking distance sensor...");
  if (distance.available()) {
    int measure = distance.get();
    Serial.println(String(measure) + "mm");
  } else {
    Serial.println("Distance: N/A");
  }
  delay(100);
}```

and the Serial Monitor constantly says

Distance N/A

Did I get a dud part or has anyone else have issues? I wonder if I could use some the Adafruit Stemma libraries instead. Any ideas would be super helpful thanks

Which version of the library are you using?
Take into account that in this example, the values are only printed in the Serial Monitor when the sensor detects an object, so place your hand over the sensor and the values should show up

Hello @explori ,

Thank you for your post. We have identified a potential issue that may be causing the Modulino Distance to not function properly. We are currently working on a patch to resolve this problem.

Meanwhile, as a temporary solution, please try downgrading the STM32duino VL53L4CD library to version 1.0.3, as shown in the screenshot I’ve provided. This should resolve your issue until we release an updated version of the library with the necessary patch.

image

Please try this solution and let me know if it works for you.

Have a great day!

Hello everyone!

We are pleased to announce that the new version of the Modulino Library (0.4.2) is now available. This update should resolve the reported issues with the Modulino Distance.

Recommended Steps:

  1. Install the new version: Go to the Arduino IDE Library Manager and update to version 0.4.2 of the Modulino library.

image

  1. If issues persist: Remove the Modulino library from the Library Manager and reinstall it.

Please try these solutions and let us know if the problem is resolved or if you need further assistance.

Thank you for your cooperation!