The Adafruit 1.2 Inch 8x8 LED Matrix Backpack is a compact and easy-to-use hardware module that simplifies the process of controlling an 8x8 grid of white LEDs. This component is ideal for creating displays for characters, symbols, and simple graphics in various electronics projects. Common applications include wearable electronics, message boards, and educational tools for teaching programming and electronics.
Pin | Description |
---|---|
VCC | Power supply (4.5V - 5.5V) |
GND | Ground connection |
SDA | I2C data line |
SCL | I2C clock line |
To use the Adafruit 1.2 Inch 8x8 LED Matrix Backpack in a circuit, follow these steps:
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_LEDBackpack.h>
Adafruit_8x8matrix matrix = Adafruit_8x8matrix();
void setup() {
matrix.begin(0x70); // Start the LED matrix with the I2C address
matrix.setBrightness(10); // Set brightness level (0 is dim, 15 is bright)
}
void loop() {
matrix.clear(); // Clear the matrix display
matrix.drawPixel(4, 4, LED_ON); // Draw a single pixel
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);
}
This example initializes the LED matrix and blinks a single pixel on and off. Ensure you have installed the Adafruit_GFX
and Adafruit_LEDBackpack
libraries before uploading this code to your Arduino UNO.
setBrightness()
function or check the power supply voltage.i2cdetect
tool or similar to confirm that the Arduino can communicate with the LED matrix.Q: Can I use this LED matrix with a 3.3V system?
A: While the matrix is rated for 4.5V - 5.5V, it may work at 3.3V with reduced brightness. However, this is not officially supported and may lead to unpredictable behavior.
Q: How do I change the I2C address?
A: Solder the address jumpers on the back of the PCB to configure the address between 0x70 and 0x77.
Q: Can I daisy-chain multiple matrices?
A: Yes, you can connect multiple matrices in series by connecting the SDA and SCL lines in parallel and providing each matrix with a unique I2C address.