ESP32 and MPU-6050 Setup
Table
| Block | From | To | Notes |
|---|---|---|---|
| IMU power | MPU-6050 6 DOF Sensor Module VCC | 3V3 | 3.3 V supply |
| IMU ground | MPU-6050 6 DOF Sensor Module GND | GND | Common ground |
| I2C data | MPU-6050 6 DOF Sensor Module SDA | GPIO8 | I2C SDA |
| I2C clock | MPU-6050 6 DOF Sensor Module SCL | GPIO9 | I2C SCL |
| Motor input A1 | L298N IN1 | GPIO4 | Direction control |
| Motor input A2 | L298N IN2 | GPIO5 | Direction control |
| Motor input B1 | L298N IN3 | GPIO6 | Direction control |
| Motor input B2 | L298N IN4 | GPIO7 | Direction control |
| Motor enable A | L298N ENA | GPIO10 | PWM speed control |
| Motor enable B | L298N ENB | GPIO11 | PWM speed control |
| Motor driver ground | L298N GND | GND | Must share ground with ESP32 |
Table
| Net name | Connection |
|---|---|
| I2C_SDA | GPIO8 to MPU-6050 6 DOF Sensor Module SDA |
| I2C_SCL | GPIO9 to MPU-6050 6 DOF Sensor Module SCL |
| MOTOR_IN1 | GPIO4 to L298N IN1 |
| MOTOR_IN2 | GPIO5 to L298N IN2 |
| MOTOR_IN3 | GPIO6 to L298N IN3 |
| MOTOR_IN4 | GPIO7 to L298N IN4 |
| MOTOR_ENA | GPIO10 to L298N ENA |
| MOTOR_ENB | GPIO11 to L298N ENB |
| 3V3 | 3V3 to MPU-6050 6 DOF Sensor Module VCC |
| GND | GND shared by ESP32, MPU-6050 6 DOF Sensor Module, and L298N |
I2C_SDAI2C_SCLMOTOR_IN1MOTOR_IN2MOTOR_IN3MOTOR_IN4MOTOR_ENAMOTOR_ENBESP32-S3 28mm