Skip to content

Library doesn't work with new Seead Ultrasonic Distance Ranger V2 #69

@benpaddlejones

Description

@benpaddlejones

Describe the bug
Code loads, Serial monitor prints line statements but measurement value is always 0

Code to reproduce

#include <Ultrasonic.h>

Ultrasonic myUltrasonicSensor(5);
int distance;

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

void loop() {
  // Pass INC as a parameter to get the distance in inches
  distance = myUltrasonicSensor.read();
  
  Serial.print("Distance in CM: ");
  Serial.println(distance);
  delay(1000);
}

Wiring
Connected to a Seead Senor Shield

Expected behavior
As Sensor is moved distance value should show distance to object

Error message
none

Context (please complete the following information):

  • OS: [e.g. Windows x64]
  • IDE version: [e.g. Arduino 1.8.5]
  • Sensor: [e.g. HC-SC04]
  • Library version [e.g. 2.1.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions