Categories
Sensors

Distance

Page 16

Ultrasonic Ranger library

In software, a library is a collection of organised and reusable resources. The Grove Ultrasonic Ranger that we are using in this project requires a specific library, named Seeed_Arduino_UltrasonicRanger.

Something to note:

The researcher has completed the following steps on this page. You will not have to do it. Nevertheless, we would like you to look at the process to tell us about your understanding.

In the Sketch tab, identify the button that says “Open full editor.” Click that button to open the full editor. There you can configure the sketch to use the required library.

Arduino IoT Cloud: Open full editor
Arduino IoT Cloud: full editor
  1. on the left pane, go to the libraries section
  2. search for “ultrasonic”
  3. click the triangle icon besides the name and download the Grove Ultrasonic Ranger library to your hard disk
  4. unzip the downloaded file (Grove_Ultrasonic_Ranger-1.0.1.zip)
  5. remove from your system the .zip file
  6. find the library.properties file and open it with a text editor
  7. replace the line that says
    name=Grove Ultrasonic Ranger
    with
    name=Ultrasonic
  8. zip the Grove_Ultrasonic_Ranger-1.0.1 directory
  9. go back to the Arduino Editor and import the .zip file you just created
  10. you will see the library you just imported as Ultrasonic

You can now click the Go To IoT Cloud button to return to the Arduino IoT Cloud Editor.

Continue to Page 17 – Write the software.