HT16K33 4-digit 7-segment backpack (I2C) con ESP32
Alimentazione 3.3-5 V
Bus I2C
Indirizzo I2C
0x70 / 0x71 / 0x72 / 0x73 / 0x74 / 0x75 / 0x76 / 0x77
Pin e collegamento all’ESP32
| Pin | Ruolo | Pin ESP32 | Note |
|---|---|---|---|
| + | Alimentazione | 3V3 | Pin order varies between boards: match by the printed label. HT16K33 is rated 4.5 to 5.5 V. At 3V3 it usually works, dimmer |
| - | Massa | GND | |
| D | Dati I2C (SDA) | D21 | I2C data (SDA) |
| C | Clock I2C (SCL) | D22 | I2C clock (SCL) |
Collegamento consigliato per l’ESP32 DevKit a 30 pin, evitando i pin della flash, di sola lettura e di strapping. BoardPilot lo controlla mentre colleghi.
Codice di partenza (Arduino)
#include <Wire.h>
void setup() {
Serial.begin(115200);
Wire.begin(21, 22); // SDA = GPIO 21, SCL = GPIO 22
Wire.beginTransmission(0x70);
bool found = Wire.endTransmission() == 0;
Serial.println(found ? "HT16K33 4-digit 7-segment backpack (I2C) found at 0x70" : "Not found: check power, GND and SDA/SCL");
}
void loop() {}
Fonti
- Holtek HT16K33 datasheet, Slave address 1110 A2 A1 A0; VDD 4.5 to 5.5 V
- Adafruit LED Backpacks guide, 0.56" 7-segment backpack pinouts, address jumpers A0 to A2
Provalo in 3D in BoardPilot
Componenti simili
HT16K33 8x8 LED matrix backpack (I2C)LCD 16x2 with I2C backpackLCD 20x4 with I2C backpackSH1106 OLED 1.3" 128x64 (I2C)SSD1306 OLED 0.91" 128x32 (I2C)SSD1306 OLED 128x64 (I2C)
Dati dei componenti: CC BY 4.0, riutilizzabili citando BoardPilot.