/* This example shows basic usage of the NeoTrellis. The buttons will light up various colors when pressed. The interrupt pin is not used in this example. */ #include "Adafruit_NeoTrellis.h" Adafruit_NeoTrellis trellis; //define a callback for key presses TrellisCallback blink(keyEvent evt){ // Check is the pad pressed? if (evt.bit.EDGE == SEESAW_KEYPAD_EDGE_RISING) { trellis.pixels.setPixelColor(evt.bit.NUM, Wheel(map(evt.bit.NUM, 0, trellis.pixels.numPixels(), 0, 255))); //on rising } else if (evt.bit.EDGE == SEESAW_KEYPAD_EDGE_FALLING) { // or is the pad released? trellis.pixels.setPixelColor(evt.bit.NUM, 0); //off falling } // Turn on/off the neopixels! trellis.pixels.show(); return 0; } void setup() { Serial.begin(9600); // while(!Serial) delay(1); if (!trellis.begin()) { Serial.println("Could not start trellis, check wiring?"); while(1) delay(1); } else { Serial.println("NeoPixel Trellis started"); } //activate all keys and set callbacks for(int i=0; i