Hi. Im using a 8x8 matrix with the Arduino RowColumnScanning example sketch (with slight modification). Its working "fine," but the LED's are MUCH dimmer than they are when they are manually set. Anybody know what's causing this?
const int col[8] = {
[glow]2,3,4,5,6,7,8,9[/glow] };
const int row[8] = {
[glow]10,11,12,13,16,17,18,19[/glow] };
int pixels[8][8];
int x = 5;
int y = 5;
void setup() {
for (int thisPin = 0; thisPin < 8; thisPin++) {
pinMode(col[thisPin], OUTPUT);
pinMode(row[thisPin], OUTPUT);
digitalWrite(col[thisPin], HIGH);
}
for (int x = 0; x < 8; x++) {
for (int y = 0; y < 8; y++) {
pixels[x][y] = HIGH;
}
}
}
void loop() {
readSensors();
refreshScreen();
}
void readSensors() {
pixels[x][y] = HIGH;
x = map(analogRead(A0), 0, 1023, 0, 7);
y =7- map(analogRead(A1), 0, 1023, 0, 7);
pixels[x][y] = LOW;
}
void refreshScreen() {
for (int thisRow = 0; thisRow < 8; thisRow++) {
digitalWrite(row[thisRow], HIGH);
for (int thisCol = 0; thisCol < 8; thisCol++) {
int thisPixel = pixels[thisRow][thisCol];
digitalWrite(col[thisCol], thisPixel);
if (thisPixel == LOW) {
digitalWrite(col[thisCol], HIGH);
}
}
digitalWrite(row[thisRow], LOW);
}
}