HRLV

HRLV-MaxSonar-EZ sensor #

The high resolution HRLV‑MaxSonar‑EZ senors are high performance ultrasonic sensors with noise rejection, improved automatic calibration, and factory calibrated beam patterns. The HRLV‑MaxSonar‑EZ sensors have three outputs: Analog Voltage, Pulse Width, RS232 or TTL serial data.

hrlv

Documentation for this sensor is available here.

Connecting to Arduino #

hrlv-arduino

Code example #

/********************
* HRLV EZ Max sonar 
* Reading analog voltage
* http://www.maxbotix.com
****************/

int sonarPin = A0;
float mm = 0.0;

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

void loop() {
  mm = analogRead(sonarPin) * 5;
  Serial.print(mm);
  Serial.println("mm");
  delay(100);
}
The raw source of the sketch example is visible here.

Enjoy!

2018 - Muhammad Ehsan, Mamour Diop & Congduc Pham