DRV2605L haptic motor driver (I2C) con ESP32
Alimentazione 3.3-5 V
Bus I2C
Indirizzo I2C
0x5A
Pin e collegamento all’ESP32
| Pin | Ruolo | Pin ESP32 | Note |
|---|---|---|---|
| VIN | Alimentazione | 3V3 | 3.3 V or 5 V |
| GND | Massa | GND | |
| SCL | Clock I2C (SCL) | D22 | |
| SDA | Dati I2C (SDA) | D21 | |
| IN | Ingresso (lo pilota l’ESP32) | D25 | Optional trigger or PWM / analog input |
| MOTOR+ | Non collegato all’ESP32 | — | Vibration motor (ERM) or LRA + |
| MOTOR- | Non collegato all’ESP32 | — | Vibration motor (ERM) or LRA - |
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(0x5A);
bool found = Wire.endTransmission() == 0;
Serial.println(found ? "DRV2605L haptic motor driver (I2C) found at 0x5A" : "Not found: check power, GND and SDA/SCL");
}
void loop() {}
Fonti
- Texas Instruments DRV2605L datasheet, I2C address 0x5A; supply 2 to 5.2 V; built-in effect library
- Adafruit DRV2605L Haptic Controller guide, Pinouts
Provalo in 3D in BoardPilot
Componenti simili
AT24C256 I2C EEPROM moduleAW9523 16-bit I/O expander and LED driverMB85RC256V I2C FRAM breakout (32 KB)MCP23008 8-bit I/O expander (DIP-18)MCP23017 16-bit I/O expanderMCP4725 12-bit DAC breakout
Dati dei componenti: CC BY 4.0, riutilizzabili citando BoardPilot.