NewPing library + Arduino UNO R4 Minima

Hello,
I'm trying to use the newping library with a SR04M sensor and an arduino UNO R4 minima. When uploading the scketch i get the following message :
ATTENTION: la bibliothèque NewPing prétend être exécutable sur la (ou les) architecture(s) avr, arm, megaavr, esp32 et peut être incompatible avec votre carte actuelle qui s'exécute sur renesas_uno.

Am I missing a configuration or something to do ? Or is it just not compatible ?
Thanks for your help :slight_smile:

Not every library is compatible with every board/processor (especially newer boards/processors). It however might be; the only way to find out is to test.

Note:
Is that the only message or do you also get errors?

You can test it without a library:

The mechanics are plain state change detection.

Thanks for your answer.
I get no errors, only that message, but nothing is happening when i upload my sketch to the minima, so i guess it is a compatibility issue...
I'm using this sample script from the library, connexions are ok :

// ---------------------------------------------------------------------------
// Example NewPing library sketch that does a ping about 20 times per second.
// ---------------------------------------------------------------------------

#include <NewPing.h>

#define TRIGGER_PIN  12  // Arduino pin tied to trigger pin on the ultrasonic sensor.
#define ECHO_PIN     11  // Arduino pin tied to echo pin on the ultrasonic sensor.
#define MAX_DISTANCE 400 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.

NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.

void setup() {
  Serial.begin(115200); // Open serial monitor at 115200 baud to see ping results.
}

void loop() {
  delay(50);                     // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.
  Serial.print("Ping: ");
  Serial.print(sonar.ping_cm()); // Send ping, get distance in cm and print result (0 = outside set distance range)
  Serial.println("cm");
}

I'm not sure I understood correctly what you mean by "nothing is happening". Please provide a more detailed description of what you mean by this in a reply on this forum thread to help us to understand it.

Did you open the Arduino IDE Serial Monitor? If so, did you see anything printed there?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.