Place the shield over the pins. Press down evenly on the edges. You should hear a "click" as the plastic clips (if present) engage.
// Sweep back for (pos = 180; pos >= 0; pos--) myservo.write(pos); delay(15); int distance = readUltrasonic(); Serial.print("Angle: "); Serial.print(pos); Serial.print(" cm: "); Serial.println(distance); arduino sensor shield v5 0 manual
void setup() Serial.begin(9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); myservo.attach(10); // Servo is on pin 10 (SERVO1) Place the shield over the pins
Plug the USB cable into the Arduino. The "PWR" LED on the Arduino should light up. The "5V" LED on the Sensor Shield should also light up. int distance = readUltrasonic()