Thank you Defragster.
@Moris526, in the Multirellis example's void setup() we have this:-
Code:
void setup() {
Serial.begin(9600);
//while(!Serial);
if(!trellis.begin()){
Serial.println("failed to begin trellis");
while(1);
}
/* the array can be addressed as x,y or with the key number */
for(int i=0; i<Y_DIM*X_DIM; i++){
trellis.setPixelColor(i, Wheel(map(i, 0, X_DIM*Y_DIM, 0, 255))); //addressed with keynum
trellis.show();
delay(50);
}
for(int y=0; y<Y_DIM; y++){
for(int x=0; x<X_DIM; x++){
//activate rising and falling edges on all keys
trellis.activateKey(x, y, SEESAW_KEYPAD_EDGE_RISING, true);
trellis.activateKey(x, y, SEESAW_KEYPAD_EDGE_FALLING, true);
trellis.registerCallback(x, y, blink);
trellis.setPixelColor(x, y, 0x000000); //addressed with x,y
trellis.show(); //show all LEDs
delay(50);
}
}
}
You might try:-
Code:
void setup() {
Serial.begin(9600);
//while(!Serial);
if(!trellis.begin()){
Serial.println("failed to begin trellis");
while(1);
}
/* the array can be addressed as x,y or with the key number */
for(int i=0; i<Y_DIM*X_DIM; i++){
trellis.setPixelColor(i, Wheel(map(i, 0, X_DIM*Y_DIM, 0, 255))); //addressed with keynum
trellis.show();
delay(50);
}
for(int y=0; y<Y_DIM; y++){
for(int x=0; x<X_DIM; x++){
//activate rising and falling edges on all keys
trellis.activateKey(x, y, SEESAW_KEYPAD_EDGE_RISING, true);
trellis.activateKey(x, y, SEESAW_KEYPAD_EDGE_FALLING, true);
trellis.registerCallback(x, y, blink);
trellis.setPixelColor(x, y, 0x000000); //addressed with x,y
}
}
trellis.show(); //show all LEDs
delay(50);
}
Sorted out my issue with getting the second block working, with or without using the Int pin