### Grove Ultrasonic Ranger Example Source: https://github.com/seeed-studio/seeed_arduino_ultrasonicranger/blob/master/README.md This snippet demonstrates how to use the Grove Ultrasonic Ranger library in an Arduino sketch. It assumes the sensor is correctly connected and provides a basic example of reading distance values. ```Arduino #include // Define the digital pin connected to the SIG pin of the Grove - Ultrasonic Ranger #define SIG_PIN 2 // Create an instance of the Ultrasonic Ranger Ultrasonic_Ranger ranger(SIG_PIN); void setup() { Serial.begin(9600); } void loop() { // Read the distance in centimeters long distance = ranger.getDistance(); if (distance == -1) { Serial.println("Error: Could not read distance."); } else { Serial.print("Distance: "); Serial.print(distance); Serial.println(" cm"); } delay(100); } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.