-
Notifications
You must be signed in to change notification settings - Fork 82
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
ESP8266 COMPATIBILITY #3
Comments
Hello, |
This code may work.
|
Hello, The sensor is very simple, just need to read the datasheet and the other document about the registers map. These documents are complements, frankly I think they should be just one, as are the datasheet of the pic of the microchip. https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Register-Map1.pdf |
@tockn unfortunately the code doesn't work on NodeMCU dev board V1.0. It Show values like there is no an I2C device connected. |
hmm... |
/*This code actually works but prints the incrementing the gyroangle values, and goes on incrementing by 0.1 /sec or so using esp8266 esp 01 module and mpu6050 gy521 please help*/ #include <ESP8266WiFi.h> MPU6050 mpu6050(Wire); const char* ssid = "TP-LINK_ED27"; // Create an instance of the server void setup() { // Connect to WiFi network WiFi.mode(WIFI_STA); while (WiFi.status() != WL_CONNECTED) { // Start the server // Print the IP address delay(5000); mpu6050.begin(); delay(1000); void loop() { WiFiClient client = server.available();
} // Wait until the client sends some data mpu6050.update(); delay(1); Serial.println("Client disonnected"); // The client will actually be disconnected |
Had the same issue. Fixed it by lowering the samples from 3000 to 200. In calcGyroOffsets() in MPU6050_tockn.cpp, you can limit the sampling. The ESP8266 currently has some issues with high value for loops. Hope it helps. |
can u show me which one need to be lowering the sample from 3000 to 200?? void MPU6050::calcGyroOffsets(bool console){ delay(1000);
} |
use this : `#include "MPU6050_tockn.h" MPU6050::MPU6050(TwoWire &w){ MPU6050::MPU6050(TwoWire &w, float aC, float gC){ void MPU6050::begin(){ void MPU6050::writeMPU6050(byte reg, byte data){ byte MPU6050::readMPU6050(byte reg) { void MPU6050::setGyroOffsets(float x, float y, float z){ void MPU6050::calcGyroOffsets(bool console){ delay(1000);
} void MPU6050::update(){
}` Hopefully it works for you |
There is a way to make it works in a ESP8266 Based Dev Board?
Thanks...
The text was updated successfully, but these errors were encountered: