Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Arduino LED Matrix 1 (Happy Face)
- // For MAX7219 and 8x8 LED Matrix
- //Let me write the coordinates of your 8x8 LED Matrix
- //(1,0), (2,0), (3,0), (4,0), (5,0), (6,0), (7,0), (0,0)
- //(1,1), (2,1), (3,1), (4,1), (5,1), (6,1), (7,1), (0,1)
- //(1,2), (2,2), (3,2), (4,2), (5,2), (6,2), (7,2), (0,2)
- //(1,3), (2,3), (3,3), (4,3), (5,3), (6,3), (7,3), (0,3)
- //(1,4), (2,4), (3,4), (4,4), (5,4), (6,4), (7,4), (0,4)
- //(1,5), (2,5), (3,5), (4,5), (5,5), (6,5), (7,5), (0,5)
- //(1,6), (2,6), (3,6), (4,6), (5,6), (6,6), (7,6), (0,6)
- //(1,7), (2,7), (3,7), (4,7), (5,7), (6,7), (7,7), (0,7)
- #include <Sprite.h>
- #include <Matrix.h>
- const int loadPin = A1;
- const int clockPin = A3;
- const int dataPin = A2;
- Matrix myMatrix = Matrix(A2, A3, A1);
- void setup()
- {}
- void loop()
- {
- myMatrix.clear();
- delay(1000);
- // Happy face
- myMatrix.write(1, 5, HIGH);
- myMatrix.write(2, 2, HIGH);
- myMatrix.write(2, 6, HIGH);
- myMatrix.write(3, 6, HIGH);
- myMatrix.write(4, 6, HIGH);
- myMatrix.write(5, 2, HIGH);
- myMatrix.write(5, 6, HIGH);
- myMatrix.write(6, 5, HIGH);
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement