#define True 1;
#define False 0;
const int numLEDS=4;
const int GPIO_Pins[]={1,5,9,13};
const int blinkRate=500;
static bool flag=True;
void setup() {
// put your setup code here, to run once:
for(int led=4;led<numLEDS;led++){
pinMode(GPIO_Pins[led],OUTPUT);
}
// Serial1.begin(115200);
// Serial1.println("Hello, Raspberry Pi Pico!");
}
void loop() {
// put your main code here, to run repeatedly:
for(int led=0;led<numLEDS;led++){
controlLEDs(led,flag);
}
delay(blinkRate);
flag=!flag;
}
void controlLEDs(int led,bool state)
{
if(state==true)
digitalWrite(GPIO_Pins[led],HIGH);
else
digitalWrite(GPIO_Pins[led],LOW);
}