Arduino Sensor Shield V5 0 Manual -

You are prototyping a robot, building a weather station, or teaching a class. Do not use it if: You are building the final, compact product, or you need high-current motor control.

Enter the . This expansion board (or "shield") is designed to solve exactly this problem. It turns your messy breadboard into a clean, plug-and-play hub for sensors and servos. arduino sensor shield v5 0 manual

int readUltrasonic() digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); long duration = pulseIn(echoPin, HIGH); int distance = duration * 0.034 / 2; return distance; You are prototyping a robot, building a weather

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. This expansion board (or "shield") is designed to

void setup() Serial.begin(9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); myservo.attach(10); // Servo is on pin 10 (SERVO1)