New paste Repaste Download
// Runs once when the Arduino starts
void setup() {
  // Configure LED pins as outputs
  pinMode(5, OUTPUT); // Green LED
  pinMode(6, OUTPUT); // Blue LED
  pinMode(7, OUTPUT); // Red LED
}
// Runs repeatedly after setup()
void loop() {
  // Turn ON Green LED, turn OFF others
  digitalWrite(5, HIGH);   // Green ON
  digitalWrite(6, LOW);    // Blue OFF
  digitalWrite(7, LOW);    // Red OFF
  delay(1000);             // wait 1 second
  // Turn ON Blue LED, turn OFF others
  digitalWrite(6, HIGH);   // Blue ON
  digitalWrite(5, LOW);    // Green OFF
  digitalWrite(7, LOW);    // Red OFF
  delay(1000);             // wait 1 second
  // Turn ON Red LED, turn OFF others
  digitalWrite(7, HIGH);   // Red ON
  digitalWrite(5, LOW);    // Green OFF
  digitalWrite(6, LOW);    // Blue OFF
  delay(1000);             // wait 1 second
}
Filename: None. Size: 868b. View raw, , hex, or download this file.

This paste expires on 2026-03-18 04:48:39.682116+00:00. Pasted through web.