The Adafruit NeoKey FeatherWing (Part ID: 4979) is a versatile input device designed to integrate seamlessly with Adafruit Feather boards. It features two mechanical key switches with customizable RGB LED backlighting, making it ideal for creating compact keyboards, control interfaces, or interactive projects. The NeoKey FeatherWing simplifies the process of adding tactile input and vibrant lighting to your Feather-based designs.
The Adafruit NeoKey FeatherWing is designed to be user-friendly and compatible with a wide range of Feather boards. Below are its key technical details:
0x30
(configurable via solder jumpers)The NeoKey FeatherWing connects directly to Feather boards via its headers. Below is the pinout:
Pin | Name | Description |
---|---|---|
3V | 3.3V Power | Power input for the FeatherWing (3.3V logic level). |
GND | Ground | Ground connection. |
SCL | I2C Clock Line | Serial clock line for I2C communication. |
SDA | I2C Data Line | Serial data line for I2C communication. |
A0 | Address Select | Optional pin for configuring the I2C address (via solder jumper modification). |
Below is an example of how to use the NeoKey FeatherWing with an Adafruit Feather board:
#include <Wire.h>
#include "Adafruit_NeoPixel.h"
#include "Adafruit_seesaw.h"
// Create a seesaw object for the NeoKey FeatherWing
Adafruit_seesaw neokey;
// Define the NeoPixel pin and number of LEDs
#define NEOKEY_NEOPIXEL_PIN 3
#define NUMPIXELS 2
Adafruit_NeoPixel pixels(NUMPIXELS, NEOKEY_NEOPIXEL_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(115200);
while (!Serial) delay(10); // Wait for Serial Monitor to open
// Initialize the NeoKey FeatherWing
if (!neokey.begin(0x30)) { // Default I2C address is 0x30
Serial.println("Failed to find NeoKey FeatherWing!");
while (1) delay(10);
}
Serial.println("NeoKey FeatherWing initialized!");
// Initialize the NeoPixel LEDs
pixels.begin();
pixels.setBrightness(50); // Adjust brightness (0-255)
pixels.show(); // Turn off all LEDs initially
}
void loop() {
// Check if a key is pressed
uint8_t keyPressed = neokey.digitalReadBulk();
if (keyPressed & 0x01) { // Check if key 1 is pressed
Serial.println("Key 1 pressed!");
pixels.setPixelColor(0, pixels.Color(255, 0, 0)); // Red for key 1
} else {
pixels.setPixelColor(0, 0); // Turn off LED for key 1
}
if (keyPressed & 0x02) { // Check if key 2 is pressed
Serial.println("Key 2 pressed!");
pixels.setPixelColor(1, pixels.Color(0, 0, 255)); // Blue for key 2
} else {
pixels.setPixelColor(1, 0); // Turn off LED for key 2
}
pixels.show(); // Update the LEDs
delay(50); // Small delay for debounce
}
NeoKey FeatherWing Not Detected:
0x30
by default).RGB LEDs Not Lighting Up:
Key Presses Not Detected:
digitalReadBulk()
function for proper key state detection.Can I use more than one NeoKey FeatherWing? Yes, but you must configure unique I2C addresses for each FeatherWing by modifying the solder jumpers.
What key switches are compatible? The NeoKey FeatherWing supports Kailh-compatible mechanical switches.
How do I change the RGB LED colors?
Use the setPixelColor()
function from the NeoPixel library to customize the LED colors.
Is it compatible with non-Adafruit Feather boards? The NeoKey FeatherWing is designed for Adafruit Feather boards but may work with other boards that support 3.3V I2C communication.