1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-13 23:48:46 +01:00
Arduino/hardware/libraries/Matrix/examples/hello_matrix/hello_matrix.pde
David A. Mellis 2fa8deb92d First integration of the Arduino code in Processing 5503: PreProcessor and Compiler have been integrated with changes to the Sketch.
Compilation still has problems (Thread error on success, and can't handle non-pde files in a sketch).
Modified the Mac OS X make.sh to copy the hardware, avr tools, and example over.
Removing some of the antlr stuff.  
Disabling the Commander (command-line execution) for now.
Added Library, LibraryManager, and Target.
Added support for prefixed preferences (e.g. for boards and programmers).
2009-06-01 08:32:11 +00:00

43 lines
765 B
Plaintext

#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);
}