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.
Slide the Grove Base shield onto the Arduberry. Attach the Ultrasonic Ranger to Port D7.
Power on the Raspberry Pi.
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.
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).
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.
Have a question? Post it on the forums and we’ll help you out.