https://www.alibaba.com/sho…/hc--sr04-ultrasonic-sensor.html
This HC-SR04 Ultrasonic Ranging Sensor is a non-contact distance measurement module with stable performance and high ranging accuracy. with the inexpensive price,
The measurment range if it can be upto 5M,
which would be helpful for your project such as robotic Obstacle Avoidance and so on.
Features
Power supply: 5V DC.
Effectual angle: <15°.
Ranging distance: 2cm – 500 cm.
Resolution: 1 cm.
Ultrasonic Frequency: 40k Hz.
Connect this triple axis magnetometer breadkout module to your Arduino/Crowduino I2C wires(SDA:A4,
D18;SCL:A5, D19)as IN THE PICTURE.
Programming
Copy the following program to Arduino IDE and upload to your Arduino/Crowduino
#include "Ultrasonic.h"
Ultrasonic ultrasonic(12,13);
void setup() {
Serial.begin(9600);
}
void loop()
{
Serial.println(ultrasonic.Ranging(CM));
delay(100);
}