Created
June 29, 2016 19:21
-
-
Save GreenMoonArt/17dbf9eae631f4362f358163a92cf61e to your computer and use it in GitHub Desktop.
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
// a project by Glen p yeldho | |
// for more info and updates https://www.facebook.com/glenp.yeldho | |
// http://www.instructables.com/id/Simple-Arduino-POV-/ | |
// Edited by GreenMoonArt to spell "TECH_" | |
// Connect 5 LEDs to Arduino digital pins 2, 3, 4, 5, and 6 via 200 Ohm resistors | |
// Upload the code and shake the breadboard with the LEDs on it. | |
// Vary the shaking frequency until you can see text formed by the LEDs. | |
int _[] = {0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0}; | |
int A[] = {0,1,1,1,1, 1,0,1,0,0, 0,1,1,1,1}; | |
int B[] = {1,1,1,1,1, 1,0,1,0,1, 0,1,0,1,0}; | |
int C[] = {0,1,1,1,0, 1,0,0,0,1, 1,0,0,0,1}; | |
int D[] = {1,1,1,1,1, 1,0,0,0,1, 0,1,1,1,0}; | |
int E[] = {1,1,1,1,1, 1,0,1,0,1, 1,0,1,0,1}; | |
int F[] = {1,1,1,1,1, 1,0,1,0,0, 1,0,1,0,0}; | |
int G[] = {0,1,1,1,0, 1,0,1,0,1, 0,0,1,1,0}; | |
int H[] = {1,1,1,1,1, 0,0,1,0,0, 1,1,1,1,1}; | |
int I[] = {0,0,0,0,1, 1,0,1,1,1, 0,0,0,0,1}; | |
int J[] = {1,0,0,0,0, 1,0,0,0,1, 1,1,1,1,1}; | |
int K[] = {1,1,1,1,1, 0,0,1,0,0, 0,1,0,1,1}; | |
int L[] = {1,1,1,1,1, 0,0,0,0,1, 0,0,0,0,1}; | |
int M[] = {1,1,1,1,1, 0,1,1,0,0, 0,1,1,1,1}; | |
int N[] = {1,1,1,1,1, 1,0,0,0,0, 0,1,1,1,1}; | |
int O[] = {0,1,1,1,0, 1,0,0,0,1, 0,1,1,1,0}; | |
int P[] = {1,1,1,1,1, 1,0,1,0,0, 0,1,0,0,0}; | |
int Q[] = {0,1,1,1,1, 1,0,0,1,1, 0,1,1,1,1}; | |
int R[] = {1,1,1,1,1, 1,0,1,0,0, 0,1,0,1,1}; | |
int S[] = {0,1,0,0,1, 1,0,1,0,1, 1,0,0,1,0}; | |
int T[] = {1,0,0,0,0, 1,1,1,1,1, 1,0,0,0,0}; | |
int U[] = {1,1,1,1,1, 0,0,0,0,1, 1,1,1,1,1}; | |
int V[] = {1,1,1,1,0, 0,0,0,0,1, 1,1,1,1,0}; | |
int W[] = {1,1,1,1,0, 0,0,1,1,0, 1,1,1,1,0}; | |
int X[] = {1,1,0,1,1, 0,0,1,0,0, 1,1,0,1,1}; | |
int Y[] = {1,1,0,0,0, 0,0,1,0,0, 1,1,1,1,1}; | |
int Z[] = {1,0,0,1,1, 1,0,1,0,1, 1,1,0,0,1}; | |
int letterSpace; | |
int dotTime; | |
void setup() | |
{ | |
// setting the ports of the leds to OUTPUT | |
pinMode(2, OUTPUT); | |
pinMode(3, OUTPUT); | |
pinMode(4, OUTPUT); | |
pinMode(5, OUTPUT); | |
pinMode(6, OUTPUT); | |
// defining the space between the letters (ms) | |
letterSpace = 6; | |
// defining the time dots appear (ms) | |
dotTime = 3; | |
} | |
void printLetter(int letter[]) | |
{ | |
int y; | |
// printing the first y row of the letter | |
for (y=0; y<5; y++) | |
{ | |
digitalWrite(y+2, letter[y]); | |
} | |
delay(dotTime); | |
// printing the second y row of the letter | |
for (y=0; y<5; y++) | |
{ | |
digitalWrite(y+2, letter[y+5]); | |
} | |
delay(dotTime); | |
// printing the third y row of the letter | |
for (y=0; y<5; y++) | |
{ | |
digitalWrite(y+2, letter[y+10]); | |
} | |
delay(dotTime); | |
// printing the sspace between the letters | |
for (y=0; y<5; y++) | |
{ | |
digitalWrite(y+2, 0); | |
} | |
delay(letterSpace); | |
} | |
void loop() | |
{ | |
// you can print your own text by modifing these print statements :) | |
printLetter(T); | |
printLetter(E); | |
printLetter(C); | |
printLetter(H); | |
printLetter(_); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment