xxxxxxxxxx
// Direction 1 Red off, reset for next cycle
const int red1 = 2;
const int yellow1 = 3;
const int green1 = 4;
const int red2 = 5;
const int yellow2 = 6;
const int green2 = 7;
void setup() {
pinMode(red1, OUTPUT);
pinMode(yellow1, OUTPUT);
pinMode(green1, OUTPUT);
pinMode(red2, OUTPUT);
pinMode(yellow2, OUTPUT);
pinMode(green2, OUTPUT);
}
void loop() {
// Direction 1 Green, Direction 2 Red
digitalWrite(green1, HIGH);
digitalWrite(red2, HIGH);
delay(5000); // Green for 5 seconds
// Direction 1 Yellow, Direction 2 Red