I just purchased the 16x24 Red LED Matrix, hooked it to an Arduino UNO and ran the example programs. Once I soldered the J5 jumper, everything has been working. Thanks for the excellent reference and pictures.
On to my questions. I am a programmer by trade, although new to the Arduino. Is there any documenation on the HT1632 library and various objects and methods(functions)?
I have a basic scrolling text demo working, but I'm not convinced that I am using the most efficient way to do this... or necessarily all the right methods/functions.
Here's my current code:
Code: Select all
#include "HT1632.h"
#define DATA 2
#define WR 3
#define CS 4
#define CS2 5
// use this line for single matrix
HT1632LEDMatrix matrix = HT1632LEDMatrix(DATA, WR, CS);
// use this line for two matrices!
//HT1632LEDMatrix matrix = HT1632LEDMatrix(DATA, WR, CS, CS2);
void setup() {
Serial.begin(9600);
matrix.begin(HT1632_COMMON_16NMOS);
matrix.fillScreen();
delay(500);
}
void loop() {
int x=0;
matrix.clearScreen();
// draw some text!
matrix.setTextSize(1); // size 1 == 8 pixels high
matrix.setTextColor(1); // 'lit' LEDs
for (x = 23; x > -60;x--){
matrix.setCursor(x, 8); // next line, 8 pixels down
matrix.print("Jane Ellen");
matrix.writeScreen();
delay(50);
matrix.clearScreen();
}
// whew!
}
Any suggestions would be appreciated.
Thanks,
Tony Stark