The Adafruit 1.2 Inch 8x8 LED Matrix Backpack with Yellow-Green LEDs is a compact and versatile electronic component that combines an 8x8 LED matrix display with an integrated driver board, or "backpack." This component simplifies the process of controlling multiple LEDs, making it an ideal choice for creating displays for indicators, simple animations, and text. Common applications include DIY clocks, counters, and game displays.
Pin Number | Name | Description |
---|---|---|
1 | GND | Ground connection |
2 | VCC | Power supply (4.5V - 5.5V) |
3 | SDA | I2C Data line |
4 | SCL | I2C Clock line |
5 | ADDR | Address selection (connect to GND or VCC) |
6 | RST | Reset pin (optional use) |
To use the Adafruit 1.2 Inch 8x8 LED Matrix Backpack in a circuit:
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_LEDBackpack.h>
Adafruit_8x8matrix matrix = Adafruit_8x8matrix();
void setup() {
matrix.begin(0x70); // Initialize with the I2C addr 0x70 (default)
}
void loop() {
matrix.clear();
matrix.drawPixel(0, 0, LED_ON); // Turn on a single LED in the top-left corner
matrix.writeDisplay(); // Write the changes to the display
delay(500);
matrix.clear();
matrix.writeDisplay(); // Clear the display
delay(500);
}
i2cdetect
utility or similar to confirm the device is recognized on the I2C bus.Q: Can I daisy-chain multiple LED matrix backpacks? A: Yes, you can connect multiple matrices in series by connecting the SDA and SCL lines and setting unique I2C addresses for each.
Q: How do I control the brightness of the LEDs?
A: The Adafruit LED Backpack library provides functions to control the brightness. Use matrix.setBrightness(brightness)
where brightness
is a value from 0 (dim) to 15 (bright).
Q: What is the maximum number of LED matrix backpacks I can control with one microcontroller? A: You can control up to 8 matrices on a single I2C bus, as there are 8 selectable I2C addresses available (0x70 to 0x77).