diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2011-10-20 22:16:19 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2011-10-20 22:16:19 -0700 |
commit | fc944ff979dbbd49a57722fe2d1d2acf47312eb4 (patch) | |
tree | 38cc3a5c5c8f24f55068fc4ffa73d018169fc2df /libraries/Matrix/examples/hello_matrix |
Inital commit... halfway through the project
Diffstat (limited to 'libraries/Matrix/examples/hello_matrix')
-rw-r--r-- | libraries/Matrix/examples/hello_matrix/hello_matrix.pde | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/libraries/Matrix/examples/hello_matrix/hello_matrix.pde b/libraries/Matrix/examples/hello_matrix/hello_matrix.pde new file mode 100644 index 0000000..23485c1 --- /dev/null +++ b/libraries/Matrix/examples/hello_matrix/hello_matrix.pde @@ -0,0 +1,42 @@ +#include <Sprite.h>
+#include <Matrix.h>
+
+// Hello Matrix
+// by Nicholas Zambetti <http://www.zambetti.com>
+
+// Demonstrates the use of the Matrix library
+// For MAX7219 LED Matrix Controllers
+// Blinks welcoming face on screen
+
+// Created 13 February 2006
+
+/* create a new Matrix instance
+ pin 0: data (din)
+ pin 1: load (load)
+ pin 2: clock (clk)
+*/
+Matrix myMatrix = Matrix(0, 2, 1);
+
+void setup()
+{
+}
+
+void loop()
+{
+ myMatrix.clear(); // clear display
+
+ delay(1000);
+
+ // turn some pixels on
+ 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);
+}
+
|