The Adafruit Charlieplex 9x16 Blue is a versatile and compact LED matrix that allows for the control of up to 144 blue LEDs with minimal pin usage. This is achieved through the charlieplexing technique, which is an efficient method for controlling multiple LEDs with fewer I/O pins. The matrix is ideal for creating eye-catching visual displays, wearable electronics, and informational signage.
Pin Number | Name | Description |
---|---|---|
1 | GND | Ground pin, common reference for the circuit |
2 | VCC | Power supply pin (3.0V - 5.5V) |
3 | SDA | I2C Data pin, used for sending data to the matrix |
4 | SCL | I2C Clock pin, used for clocking I2C data |
#include <Wire.h>
#include <Adafruit_IS31FL3731.h>
// Create the LED driver object
Adafruit_IS31FL3731 ledMatrix = Adafruit_IS31FL3731();
void setup() {
Wire.begin(); // Initialize I2C
if (!ledMatrix.begin()) {
Serial.println("IS31FL3731 not found");
while (1);
}
Serial.println("IS31FL3731 found!");
}
void loop() {
// Clear the frame buffer
ledMatrix.clear();
// Draw a simple pattern
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 16; j++) {
ledMatrix.drawPixel(i, j, (i + j) % 2 ? 255 : 0);
}
}
// Display the frame buffer on the LEDs
ledMatrix.displayFrame();
delay(500); // Wait for half a second
}
Note: This example assumes the use of the Adafruit IS31FL3731 library, which can be installed through the Arduino Library Manager.
Serial.println()
function to debug and verify that the microcontroller is communicating with the LED matrix.Q: Can I daisy-chain multiple Charlieplex matrices? A: Yes, multiple matrices can be daisy-chained using the I2C interface, but each matrix must have a unique I2C address.
Q: How do I set a unique I2C address for each matrix? A: The I2C address can be set by soldering the address jumpers on the back of the matrix. Refer to the Adafruit guide for the specific address configurations.
Q: What is the maximum brightness for the LEDs? A: The maximum brightness is determined by the current limit, which should not exceed 20mA per LED. Adjust the brightness within this limit to prevent damage.
Q: Can I use this matrix with a Raspberry Pi or other microcontrollers? A: Yes, the matrix can be used with any microcontroller that supports I2C communication, including the Raspberry Pi. Ensure that the appropriate library or code is used for the platform.
For further assistance, visit the Adafruit support forums or contact technical support.