Ultrasonic Ranger

Ultrasonic Ranger

In this example we show you how to use a Grove Ultrasonic Ranger to measure distance of an object, using the Raspberry Pi, Arduberry, and the Grove system.

Arduberry Project with Raspberry Pi and Ultrasonic Range FinderHardware Required

  1. Raspberry Pi
  2. Arduberry
  3. Grove Base Shield
  4. Grove Ultrasonic Ranger

Step 1

Slide the Grove Base shield onto the Arduberry.  Attach the Ultrasonic Ranger to Port D7.

Power on the Raspberry Pi.

 Arduberry Project with Raspberry Pi and Ultrasonic Range Finder

Step 2

Download the Ultrasonic Ranger library using the Netsurf Browser on your Raspberry Pi.

Save the library to /usr/share/Arduino/libraries

Extract the library to the same directory.

library

 

Step 3

Open the example UltrasonicDisplayOnTerm from the Ultrasonic folder, in Arduino.

Change the programmer to Raspberry Pi GPIO.  

Upload the sketch to the Arduberry it(use Ctrl+Shift+U).

upload4

open

 

Step 4

Open a new terminal window on the Raspberry Pi.

Start minicom (a serial port terminal) to see the Ultrasonic Ranger data being sent by the Arduberry on the Serial line.

minicom ama0

Serial

Have a question?  Post it on the forums and we’ll help you out.