// Prgram for writing "WOOOSH" int timer = 1; // The higher the number, the slower the timing. int pinCount = 7; // the number of pins (i.e. the number of leds) int arryMax = 399; // Number of total bits in the whole string int ltr8c1[] = { //Decleration of the array - one long array of all the string // Writing "instructables" // letter "W" (12) 0,0,0,1,1,1,1, 0,0,1,1,0,0,0, 0,1,1,0,0,0,0, 1,1,0,0,0,0,0, 0,1,1,0,0,0,0, 0,0,1,1,0,0,0, 0,1,1,0,0,0,0, 1,1,0,0,0,0,0, 0,1,1,0,0,0,0, 0,0,1,1,0,0,0, 0,0,0,1,1,1,1, 0,0,0,0,0,0,0, // letter "O" (9) 0,0,1,1,1,0,0, 0,1,0,0,0,1,0, 1,0,0,0,0,0,1, 1,0,0,0,0,0,1, 1,0,0,0,0,0,1, 0,1,0,0,0,1,0, 0,0,1,1,1,0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,0, // letter "O" (9) 0,0,1,1,1,0,0, 0,1,0,0,0,1,0, 1,0,0,0,0,0,1, 1,0,0,0,0,0,1, 1,0,0,0,0,0,1, 0,1,0,0,0,1,0, 0,0,1,1,1,0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,0, // letter "O" (9) 0,0,1,1,1,0,0, 0,1,0,0,0,1,0, 1,0,0,0,0,0,1, 1,0,0,0,0,0,1, 1,0,0,0,0,0,1, 0,1,0,0,0,1,0, 0,0,1,1,1,0,0, 0,0,0,0,0,0,0 , 0,0,0,0,0,0,0, // letter "S" (9) 0,1,0,0,1,1,0, 1,1,0,0,1,1,0, 1,0,0,1,0,0,1, 1,0,0,1,0,0,1, 1,0,0,1,0,0,1, 1,1,1,0,0,1,0, 0,1,1,0,0,1,0, 0,0,0,0,0,0,0 , 0,0,0,0,0,0,0, // letter "H" (9) 1,1,1,1,1,1,1, 0,0,0,1,0,0,0, 0,0,0,1,0,0,0, 0,0,0,1,0,0,0, 0,0,0,1,0,0,0, 0,0,0,1,0,0,0, 1,1,1,1,1,1,1, 0,0,0,0,0,0,0 , 0,0,0,0,0,0,0, }; int add = 0; int inPin = 0; int state = HIGH; // the current state of the output pin int reading; // the current reading from the input pin int previous = LOW; // the previous reading from the input pin long time = 0; // the last time the output pin was toggled long safedelay = 50; // A safety delay to avoid flickering due to multi triggering. void setup() { int thisPin; for (int thisPin = 0; thisPin < pinCount; thisPin++) { // use a for loop to initialize each pin as an output. The array elements are numbered from 0 to (pinCount - 1). pinMode(thisPin+1, OUTPUT); } pinMode(inPin, INPUT); // initializesinitializes pin "0" as an input pin - used for the trigger pin. } void loop() { //Here starts the loop of the actual sequance reading = digitalRead(inPin); if (reading == HIGH && previous == LOW && millis() - time > safedelay) { // Checking if there was a trigger. If yes and teh safety delay from the last trigger has passed, it starts the sequance. time = millis(); // A time counter (miliseconds) - coults the safety delay time. for (int add = 0; add < arryMax; add=add+7) { //The "add" varible points at the relevant row - untill reaching the end of the matrix. for (int thisPin = 0; thisPin <= pinCount; thisPin++) { //The varible "this pin" points at the relevant column if (ltr8c1 [thisPin+add] ) {digitalWrite(thisPin+1, HIGH); } else {digitalWrite(thisPin+1,LOW);} //if the relevant cell of the matix equals to 1, turn on the relevalnt led. Otherwise (if equals 0) - turn off led. } delay(timer); // Keep the current state for a while. for (int thisPin = 0; thisPin <= pinCount; thisPin++) { digitalWrite(thisPin+1,LOW); } } } previous = reading; }