The Adafruit Mini 8x8 LED Matrix Backpack White is a versatile and compact electronic component designed to drive an 8x8 LED matrix. This backpack simplifies the process of controlling multiple LEDs by using an I2C interface, which minimizes the number of pins required from the microcontroller. It is commonly used in projects that require a small visual display, such as wearable electronics, status indicators, or simple games. The built-in constant current drivers ensure uniform brightness, making it ideal for battery-powered applications.
Pin | Description |
---|---|
VCC | Power supply (2.5V to 5.5V) |
GND | Ground connection |
SDA | I2C data line |
SCL | I2C clock line |
ADDR | Address selection pin (connect to GND or VCC to set address) |
RST | Reset pin (optional use) |
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_LEDBackpack.h>
Adafruit_8x8matrix matrix = Adafruit_8x8matrix();
void setup() {
matrix.begin(0x70); // Initialize the matrix with its I2C address
Wire.begin(); // Join the I2C bus as master
}
void loop() {
matrix.clear(); // Clear the matrix display
matrix.drawPixel(0, 0, LED_ON); // Turn on a single LED at (0,0)
matrix.writeDisplay(); // Write the changes to the display
delay(500);
matrix.clear(); // Clear the display again
matrix.writeDisplay(); // Write the changes to the display
delay(500);
}
Q: Can I use this backpack with a Raspberry Pi? A: Yes, the Adafruit Mini 8x8 LED Matrix Backpack can be used with a Raspberry Pi using the I2C interface.
Q: How do I change the I2C address? A: The I2C address can be changed by connecting the ADDR pin to either GND or VCC. Multiple backpacks can be connected by giving each one a unique address.
Q: Can I control individual LEDs?
A: Yes, individual LEDs can be controlled using the drawPixel
function in the provided library.
Q: Is it possible to display characters or shapes? A: Yes, the Adafruit GFX library provides functions to draw characters, shapes, and even scroll text across the display.