//write a program to blink 4 LEDs
const int GPIO_Pin1 = 1; //External LED is connnected to Pin #4
const int GPIO_Pin2 = 3;
const int GPIO_Pin3 = 8;
const int GPIO_Pin4 = 12;
void setup() {
// put your setup code here, to run once:
pinMode(GPIO_Pin1, OUTPUT);//Setting GPIO pin as an output (#4 as output)
pinMode(GPIO_Pin2, OUTPUT);
pinMode(GPIO_Pin3, OUTPUT);
pinMode(GPIO_Pin4, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(GPIO_Pin1, HIGH); //LED turned on
digitalWrite(GPIO_Pin2, HIGH);
digitalWrite(GPIO_Pin3, HIGH);
digitalWrite(GPIO_Pin4, HIGH);
delay(500); //time delay for the funtion to execute is 500 milli secs
digitalWrite(GPIO_Pin1, LOW); //LED turned off
digitalWrite(GPIO_Pin2, LOW);
digitalWrite(GPIO_Pin3, LOW);
digitalWrite(GPIO_Pin4, LOW);
delay(500); //time delay for the funtion to execute is 500 milli secs
}