My Cart

Tutorials with Arduino: Range Sensor with LCD and 7 segment ledSeptember 10, 2011

It finally arrived! the Range Sensor we bought from Ebay! it´s time to see it working with our Arduino UNO board.

It´s the Ultrasonic Ranging Module HC-SR04, who works as a sonar, sending and ultrasonic sound and measuring how long does it takes to come back. This delay it´s transformed in cm by calculating the speed of the sound and the time it took to come back.

It´s a very simple easy to use sensor, that can have many applications from robots, to alarms, or even home appliances… even as a car parking assistant!

The sensor has 4 pins: 2 for +VCC and Ground and 2 for the data, this 2 goes to 2 of the Arduino digital ports

To see the measurement of the range we have plenty of options: from seeing it in the Serial Print, an LCD display, 7 segment leds, on twitter, or anything you want. We will use the LCD and the 7 segment led display for this.

[Cooking Hacks] Great tutorial of how to know the distance of an object with a Sonar sensor and a LCD.

See it in action:

You can download the library here.

Codes: available here


Via and source: Arduino Arts

2 thoughts on “Tutorials with Arduino: Range Sensor with LCD and 7 segment led”

Leave a Reply