The circuit described in this documentation is designed to control a traffic light using an Arduino 101 microcontroller. The traffic light has three LEDs (Green, Yellow, and Red) that are controlled by the digital pins of the Arduino to simulate a traffic light system. The ground (GND) pin of the traffic light is connected to the GND pin of the Arduino to complete the circuit.
No code has been provided for the microcontroller. To complete the documentation, the code for controlling the traffic light sequence should be included here. The code would typically initialize the digital pins connected to the LEDs as outputs and then create a loop that turns each LED on and off in sequence to simulate a traffic light.
// Example Arduino Sketch (not provided in the input)
void setup() {
pinMode(3, OUTPUT); // Green LED
pinMode(2, OUTPUT); // Yellow LED
pinMode(1, OUTPUT); // Red LED
}
void loop() {
digitalWrite(3, HIGH); // Green on
delay(5000); // Green for 5 seconds
digitalWrite(3, LOW); // Green off
digitalWrite(2, HIGH); // Yellow on
delay(2000); // Yellow for 2 seconds
digitalWrite(2, LOW); // Yellow off
digitalWrite(1, HIGH); // Red on
delay(5000); // Red for 5 seconds
digitalWrite(1, LOW); // Red off
}
Please note that the above code is a hypothetical example and should be replaced with the actual code intended for the Arduino 101 in this circuit.