Created
November 16, 2014 07:59
-
-
Save ringodin/8b02533b40e93859883c to your computer and use it in GitHub Desktop.
This is a sample code to get students started on their EL wiring project known as EL Wiro. This is for the Maker Robotics course at International School Manila.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Test sketch for El Escudo Dos | |
// Turn each EL channel (A-H) on in sequence and repeat | |
// Mike Grusin, SparkFun Electronics | |
int A = 2; | |
int B = 3; | |
int C = 4; | |
int D = 5; | |
int E = 6; | |
int F = 7; | |
int G = 8; | |
int H = 9; | |
void setup() { | |
// The EL channels are on pins 2 through 9 | |
// Initialize the pins as outputs | |
pinMode(2, OUTPUT); // channel A | |
pinMode(3, OUTPUT); // channel B | |
pinMode(4, OUTPUT); // channel C | |
pinMode(5, OUTPUT); // channel D | |
pinMode(6, OUTPUT); // channel E | |
pinMode(7, OUTPUT); // channel F | |
pinMode(8, OUTPUT); // channel G | |
pinMode(9, OUTPUT); // channel H | |
// We also have two status LEDs, pin 10 on the Escudo, | |
// and pin 13 on the Arduino itself | |
} | |
void loop() | |
{ | |
digitalWrite(A, HIGH); | |
delay(500); | |
digitalWrite(A, LOW); | |
digitalWrite(B, HIGH); | |
delay(500); | |
digitalWrite(B, LOW); | |
digitalWrite(C, HIGH); | |
delay(500); | |
digitalWrite(C, LOW); | |
digitalWrite(D, HIGH); | |
delay(500); | |
digitalWrite(D, LOW); | |
digitalWrite(E, HIGH); | |
delay(500); | |
digitalWrite(E, LOW); | |
digitalWrite(F, HIGH); | |
delay(500); | |
digitalWrite(F, LOW); | |
digitalWrite(G, HIGH); | |
delay(500); | |
digitalWrite(G, LOW); | |
digitalWrite(H, HIGH); | |
delay(500); | |
digitalWrite(H, LOW); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment