The Adafruit 0.56 inch 7-segment LED Backpack Red is a user-friendly module designed to drive 7-segment LED displays. This component simplifies the process of displaying numbers and characters with its bright red LEDs. It is ideal for projects requiring numeric output, such as clocks, counters, and readouts in various electronics applications.
Pin | Description |
---|---|
GND | Ground connection |
VCC | Power supply (2.7V - 5.5V) |
SDA | I2C Data line |
SCL | I2C Clock line |
GND
pin to the ground of your power supply.VCC
pin to a positive power supply (2.7V - 5.5V).SDA
and SCL
pins to the I2C data and clock lines of your microcontroller, respectively.#include <Wire.h>
#include <Adafruit_LEDBackpack.h>
#include <Adafruit_GFX.h>
Adafruit_7segment matrix = Adafruit_7segment();
void setup() {
matrix.begin(0x70); // Initialize the display with its I2C address
}
void loop() {
matrix.print(1234, DEC); // Display the number 1234
matrix.writeDisplay(); // Refresh the display with new data
delay(500); // Wait for half a second
}
matrix.setBrightness(uint8_t b)
function to adjust the brightness if the display is too dim or too bright.Q: Can I use this module with a 3.3V system? A: Yes, the module can operate at a voltage as low as 2.7V.
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 display letters as well as numbers? A: Yes, the 7-segment display can show some letters and characters, though with limited representation due to the segment layout.
Q: How many of these displays can I chain together? A: You can chain up to 8 displays by setting unique I2C addresses for each.
For further assistance, refer to the Adafruit support forums or the product's FAQ page.