Control an LED based on the range detected by an ultrasonic sensor
// Define pinsconst int trigPin = 9; // Trigger pin
Fade in the LED
const int ledPin = 9; // PWM pin connected to
Arduino program to control three LEDs
// Defining LEDsint redLED = 2;int greenLED = 3;int blankLED