The Adafruit 1.2 Inch 8x8 LED Matrix Backpack Red is a compact and versatile electronic component that simplifies the process of controlling an 8x8 LED matrix. This driver board is designed to work seamlessly with red LEDs, providing a bright and clear display for a variety of applications. Common uses include creating digital signage, gaming displays, and adding visual output to various electronic projects.
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 |
To use the Adafruit 1.2 Inch 8x8 LED Matrix Backpack Red 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 default I2C address
Wire.begin(); // Join the I2C bus as a master
}
void loop() {
matrix.clear(); // Clear the matrix display
matrix.drawPixel(0, 0, LED_ON); // Turn on a single LED at the top-left corner
matrix.writeDisplay(); // Write the changes to the display
delay(500); // Wait for half a second
matrix.clear(); // Clear the display again
matrix.writeDisplay(); // Update the display
delay(500); // Wait for another half a second
}
Q: Can I daisy-chain multiple LED matrix backpacks? A: Yes, you can connect multiple backpacks in series via the I2C bus. Remember to set a unique I2C address for each backpack.
Q: How do I change the brightness of the LEDs?
A: You can adjust the brightness in your code using the setBrightness()
function provided by the Adafruit LED Backpack library.
Q: What is the maximum number of LED matrix backpacks I can control with a single microcontroller? A: You can control up to 8 LED matrix backpacks on a single I2C bus, as there are 8 available I2C addresses from 0x70 to 0x77.