Skip to content

Instantly share code, notes, and snippets.

@pingud98
Created October 20, 2016 21:57
Show Gist options
  • Save pingud98/57fcf2ca14f888ad68d9aac448733d31 to your computer and use it in GitHub Desktop.
Save pingud98/57fcf2ca14f888ad68d9aac448733d31 to your computer and use it in GitHub Desktop.
Use this script to test the red/blue LED on the Cosmic Pi Analogue Board V2.2. Note it doesn't work when connected to the Main Board due to missing connections on main board V2 alpha
//flash the red/blue LED on the cosmic Pi analogue board when
//it's connected directly to the Arduino DUE
void setup() {
Serial.begin(115200);
Serial.println("Cosmic Pi Status: Alive");
//pinMode(13, OUTPUT);
pinMode(A1, OUTPUT);
pinMode(A3, OUTPUT);
}
void loop() {
digitalWrite(A1, HIGH);
digitalWrite(A3, HIGH);
delay(100);
digitalWrite(A1, LOW);
digitalWrite(A3, HIGH);
delay(100);
digitalWrite(A1, HIGH);
digitalWrite(A3, LOW);
delay(100);
digitalWrite(A1, LOW);
digitalWrite(A3, LOW);
delay(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment