Green Corridor project uses an Arduino to create a Green Corridor for ambulances. When traffic is light, it signals nearby traffic lights (simulated by LEDs) to turn all red lights on, clearing the path for ambulances. It also sends a message to alert ambulance drivers, ensuring they can reach their destination quickly during emergencies, Green Corridor project using Arduino for students
Arduino Uno:
- Digital Pins 5, 6,9,10,11: Connect each pin to the anode (long leg) of an LED through a current-limiting resistor (typically 220 ohms to 1k ohm). The cathode (short leg) of each LED connects to ground (GND).
Components Needed:
- Arduino Uno (or compatible microcontroller) – 1
- LEDs – 5
- Resistors – 5 (220 ohms to 1k ohm, depending on your LEDs’ specifications)
- Breadboard – 1 (for prototyping, optional but recommended)
- Jumper wires – 10-15 (M-M and M-F for connecting Arduino, LEDs, and resistors)
// Pin definitions for 10 LEDs
const int numLEDs = 5;
int LED_pins[numLEDs] = {5, 6, 9, 10, 11};
void setup() {
// Initialize LED pins as outputs
for (int i = 0; i < numLEDs; i++) {
pinMode(LED_pins[i], OUTPUT);
digitalWrite(LED_pins[i], HIGH); // Turn all LEDs ON
}
}
void loop() {
// No specific actions in loop for this example
// LEDs will remain ON as configured in setup()
}