Skip to content

Instantly share code, notes, and snippets.

@heborras
Created October 12, 2017 09:44
Show Gist options
  • Save heborras/8df6934639dcbbcb4654ec16122b7e00 to your computer and use it in GitHub Desktop.
Save heborras/8df6934639dcbbcb4654ec16122b7e00 to your computer and use it in GitHub Desktop.
A utility for testing the LED's on an CosmicPi V1.5.
//flash the red/green LED on the cosmic Pi analogue board when
//it's connected directly to the Arduino DUE
int LED1_pin = 12; // green and lower one
int LED2_pin = 11; // red and upper one
void setup() {
Serial.begin(115200);
Serial.println("Cosmic Pi Status: Alive");
pinMode(LED1_pin, OUTPUT);
pinMode(LED2_pin, OUTPUT);
}
void loop() {
digitalWrite(LED1_pin, HIGH);
digitalWrite(LED2_pin, HIGH);
delay(100);
digitalWrite(LED1_pin, LOW);
digitalWrite(LED2_pin, HIGH);
delay(100);
digitalWrite(LED1_pin, HIGH);
digitalWrite(LED2_pin, LOW);
delay(100);
digitalWrite(LED1_pin, LOW);
digitalWrite(LED2_pin, LOW);
delay(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment