// Example WokWi file for Prac 1
// The standard Arduino UNO does not support the LEDs present on the Flinduino board
// LED 1 - Red LED - represents LED1 on Flinduino
// LED 2 - Yellow LED - represents LED2 on Flinduino
// LED 3 - Green LED - represents LED3 on Flinduino
// The following defines are not required on the Flinduino
#ifndef ARDUINO_ARCH_PIC32
#define PIN_LED1 13
#define PIN_LED2 12
#define PIN_LED3 11
#endif
void setup() {
// Set LED pins to be outputs
pinMode(PIN_LED1, OUTPUT);
pinMode(PIN_LED2, OUTPUT);
pinMode(PIN_LED3, OUTPUT);
}
void loop() { // loop
// Run the LED cycle repeatedly
digitalWrite(PIN_LED3, HIGH); //turn on led 3
delay(500); // wait 500ms
digitalWrite(PIN_LED3, LOW); // turn off led 3
delay(500); // wait 500ms
digitalWrite(PIN_LED2, HIGH); //turn on led 2
digitalWrite(PIN_LED2, HIGH); //turn on led 3
delay(1000); //wait 1s
digitalWrite(PIN_LED2, LOW); //turn OFF led 2
digitalWrite(PIN_LED2, LOW); //turn OFF led 3
delay(1000); //wait 1s
}