Grove Ultrasonic Ranger

The Grove Ultrasonic Ranger is a non-contact distance measurement module which works at 42KHz. It's suitable for projects that require middle distance measurement. Detailed module information can be accessed in the official WiKi page.

You can see how to download and install the driver by referring to:

After the installation is done, follow the steps below to use this component.

Setup and Execution

  1. Connect the module to the D2 header on the LinkIt 7697 breakout board.

  2. Select the File / Examples / Grove_Ultrasonic_Ranger-master / UltrasonicDisplayOnTerm menu.

  3. Modify line 43 from 7 to 2. This makes the board use D2 header to receive the data:

    #include "Ultrasonic.h" 
     
    Ultrasonic ultrasonic(2); 
    void setup() 
    { 
        Serial.begin(9600);
  4. Click the Upload icon to compile and upload the sketch file to the board.

  5. Open the serial monitor (with baud rate 9,600) and reset the board to execute the application. You should be able to see the output as below:

Last updated