Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 error: i2c driver not installed #760

Open
Fazeli24 opened this issue Oct 30, 2023 · 0 comments
Open

ESP32 error: i2c driver not installed #760

Fazeli24 opened this issue Oct 30, 2023 · 0 comments

Comments

@Fazeli24
Copy link

Fazeli24 commented Oct 30, 2023

Hi, i'm trying to use the mpu6050 libary for my ESP32 Dev Module Board. I have connected all Pins like this:

3.3v = VCC
GND = GND
SCL = SCL
SDA = SDA

I first extracted the master .zip file and then copied both the MPU6050 and i2cdevlib folders from i2cdevlib-master/ESP32_ESP-IDF to Arduino/libraries. I was able to successfully upload this code:
`
#include "Wire.h"
#include "I2Cdev.h"
#include "MPU6050.h"

MPU6050 mpu;

int16_t gyroX, gyroRate;
float gyroAngle=0;
unsigned long currTime, prevTime=0, loopTime;

void setup() {
mpu.initialize();
Serial.begin(9600);
}

void loop() {
currTime = millis();
loopTime = currTime - prevTime;
prevTime = currTime;

gyroX = mpu.getRotationX();
gyroRate = map(gyroX, -32768, 32767, -250, 250);
gyroAngle = gyroAngle + (float)gyroRate*loopTime/1000;

Serial.println(gyroAngle);

}
`

But when running the code I get this error over serial:

E (11561) err: esp_err_t = 259
E (11564) i2c: i2c_master_cmd_begin(1426): i2c driver not installed

Does anyone know how to fix this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant