Jump to content
I2Cdevlib Forums

All Activity

This stream auto-updates     

  1. Last week
  2. Earlier
  3. Hello, I´m new with this sensor, but have been reading a lot. I´m pretty sure you should change set up in the library MPU6050_6Axis_MotionApps_V6_12.h. Regards Santiago
  4. In C++, you can specify default argument values in the prototype declaration. So you're on the right track, but the default values in this case are actually false. https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/MPU6050.h#L800
  5. Greetings, There is a piece of code called setMemoryBank, in the MPU6050 class (MPU6050.cpp). It looks like this: void MPU6050::setMemoryBank(uint8_t bank, bool prefetchEnabled, bool userBank) { bank &= 0x1F; if (userBank) bank |= 0x20; if (prefetchEnabled) bank |= 0x40; I2Cdev::writeByte(devAddr, MPU6050_RA_BANK_SEL, bank); } This is used in dmpInitialize() (MPU6050_6Axis_MotionApps20.h). Likewise, further down in dmpInitialize() writeProgMemoryBlock() is called to write the DMP code to the IMU. However, inside writeProgMemoryBlock() there is another call to setMemoryBank, but only takes one argument. The function isn't overloaded anywhere. I'm assuming it's the same function without the two booleans set to True. But I'd like to know for sure. I can't find this code anywhere else. Likewise, writeMemoryBlock() is called with 4 parameters instead of 6. I feel like this code shouldn't be here, or it's for a different API. writeProgMemoryBlock() is all wrong as well.
  6. To download McAfee Antivirus, kindly open up the web browser and visit mcafee.com/activate then enter your activation code and press enter, then choose your language and country. At last, verify your email address to activate the product. McAfee provides a full range of security products such as antivirus, firewall and anti-spyware programs. Also, learn how to uninstall McAfee.
  7. Hi! I would like to report that the Upload button does not exist and therefore there is no way for me to upload a csv. Thank you in advance.
  8. Hi there, I am using MPU6050 with two servos. With some extra addings to example MPU6050_DMP6_using_DMP_V6.12 there was no problem with servos. But when I wanted to use BMP180 and combined all of these in one code I get FIFO overflow. I was looking for solutions but none of them solved my problem exactly(or can't apply correctly). I tried to minimize the readings of datas of BMP180 and I get FIFO overflow less frequently. But servos are still slow and respond the changes of MPU6050 litte lately. So this lagging absolutely ruins the project and I cannot make any progress without solving this problem. I would be grateful if anyone can help me. Here is my code: /* Arduino nano için; Bmp180 pinleri: sda -> a4 scl -> a5 vın -> 5v gnd -> gnd Mpu6050 pinleri: vcc -> 5v gnd -> gnd scl -> a5 sda -> a4 int -> d2 RGB Led pinleri: d9, d10, d11 Servo Motor pinleri: d7, d8 Buzzer pinleri: d12 */ #include <Wire.h> #include <Adafruit_BMP085.h> #include<Servo.h> #include "I2Cdev.h" #include "MPU6050_6Axis_MotionApps20.h" //#include "MPU6050.h" // not necessary if using MotionApps include file #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE #include "Wire.h" #endif #include <Servo.h> Servo myservo,myservo2; // create servo object to control a servo #define seaLevelPressure_hPa 1013.25 Adafruit_BMP085 bmp; int R=9; int G=10; int B=11; const int buzzer = 12; MPU6050 mpu; // uncomment "OUTPUT_READABLE_QUATERNION" if you want to see the actual // quaternion components in a [w, x, y, z] format (not best for parsing // on a remote host such as Processing or something though) //#define OUTPUT_READABLE_QUATERNION // uncomment "OUTPUT_READABLE_EULER" if you want to see Euler angles // (in degrees) calculated from the quaternions coming from the FIFO. // Note that Euler angles suffer from gimbal lock (for more info, see // http://en.wikipedia.org/wiki/Gimbal_lock) //#define OUTPUT_READABLE_EULER // uncomment "OUTPUT_READABLE_YAWPITCHROLL" if you want to see the yaw/ // pitch/roll angles (in degrees) calculated from the quaternions coming // from the FIFO. Note this also requires gravity vector calculations. // Also note that yaw/pitch/roll angles suffer from gimbal lock (for // more info, see: http://en.wikipedia.org/wiki/Gimbal_lock) #define OUTPUT_READABLE_YAWPITCHROLL // uncomment "OUTPUT_READABLE_REALACCEL" if you want to see acceleration // components with gravity removed. This acceleration reference frame is // not compensated for orientation, so +X is always +X according to the // sensor, just without the effects of gravity. If you want acceleration // compensated for orientation, us OUTPUT_READABLE_WORLDACCEL instead. //#define OUTPUT_READABLE_REALACCEL // uncomment "OUTPUT_READABLE_WORLDACCEL" if you want to see acceleration // components with gravity removed and adjusted for the world frame of // reference (yaw is relative to initial orientation, since no magnetometer // is present in this case). Could be quite handy in some cases. //#define OUTPUT_READABLE_WORLDACCEL // uncomment "OUTPUT_TEAPOT" if you want output that matches the // format used for the InvenSense teapot demo //#define OUTPUT_TEAPOT #define INTERRUPT_PIN 2 // use pin 2 on Arduino Uno & most boards #define LED_PIN 11 // (Arduino is 13, Teensy is 11, Teensy++ is 6) #define SERVO_PIN 7 // use pin 9 for servo control #define SERVO_PIN2 8 bool blinkState = false; // MPU control/status vars bool dmpReady = false; // set true if DMP init was successful uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU uint8_t devStatus; // return status after each device operation (0 = success, !0 = error) uint16_t packetSize; // expected DMP packet size (default is 42 bytes) uint16_t fifoCount; // count of all bytes currently in FIFO uint8_t fifoBuffer[64]; // FIFO storage buffer // orientation/motion vars Quaternion q; // [w, x, y, z] quaternion container VectorInt16 aa; // [x, y, z] accel sensor measurements VectorInt16 aaReal; // [x, y, z] gravity-free accel sensor measurements VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor measurements VectorFloat gravity; // [x, y, z] gravity vector float euler[3]; // [psi, theta, phi] Euler angle container float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector // packet structure for InvenSense teapot demo uint8_t teapotPacket[14] = { '$', 0x02, 0,0, 0,0, 0,0, 0,0, 0x00, 0x00, '\r', '\n' }; // ================================================================ // === INTERRUPT DETECTION ROUTINE === // ================================================================ volatile bool mpuInterrupt = false; // indicates whether MPU interrupt pin has gone high void dmpDataReady() { mpuInterrupt = true; } // ================================================================ // === INITIAL SETUP === // ================================================================ void setup() { //Kırmızı renk elde etmek için... analogWrite(R,255); analogWrite(G,0); analogWrite(B,0); //delay(500); Serial.begin(38400); Serial.println("Ucus Bilgisayari deneme"); if (!bmp.begin()) { Serial.println("BMP280 bulunamadi!"); analogWrite(R,255); analogWrite(G,0); analogWrite(B,0); while (1) {} } myservo.attach(SERVO_PIN); myservo2.attach(SERVO_PIN2); myservo.write(0); // join I2C bus (I2Cdev library doesn't do this automatically) #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE Wire.begin(); TWBR = 48; Wire.setClock(400000); // 400kHz I2C clock. Comment this line if having compilation difficulties #elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE Fastwire::setup(400, true); #endif // Serial.begin(115200); while (!Serial); // wait for Leonardo enumeration, others continue immediately // NOTE: 8MHz or slower host processors, like the Teensy @ 3.3v or Ardunio // Pro Mini running at 3.3v, cannot handle this baud rate reliably due to // the baud timing being too misaligned with processor ticks. You must use // 38400 or slower in these cases, or use some kind of external separate // crystal solution for the UART timer. // initialize device Serial.println(F("Initializing I2C devices...")); mpu.initialize(); pinMode(INTERRUPT_PIN, INPUT); // verify connection Serial.println(F("Testing device connections...")); Serial.println(mpu.testConnection() ? F("MPU6050 connection successful") : F("MPU6050 connection failed")); if(!mpu.testConnection()){ analogWrite(R,255); analogWrite(G,0); analogWrite(B,0); } // wait for ready Serial.println(F("\nSend any character to begin DMP programming and demo: ")); while (Serial.available() && Serial.read()); // empty buffer while (!Serial.available()); // wait for data while (Serial.available() && Serial.read()); // empty buffer again // load and configure the DMP Serial.println(F("Initializing DMP...")); devStatus = mpu.dmpInitialize(); // supply your own gyro offsets here, scaled for min sensitivity mpu.setXGyroOffset(220); mpu.setYGyroOffset(76); mpu.setZGyroOffset(-85); mpu.setZAccelOffset(1788); // 1688 factory default for my test chip // make sure it worked (returns 0 if so) if (devStatus == 0) { // turn on the DMP, now that it's ready Serial.println(F("Enabling DMP...")); mpu.setDMPEnabled(true); // enable Arduino interrupt detection Serial.println(F("Enabling interrupt detection (Arduino external interrupt 0)...")); attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), dmpDataReady, RISING); mpuIntStatus = mpu.getIntStatus(); // set our DMP Ready flag so the main loop() function knows it's okay to use it Serial.println(F("DMP ready! Waiting for first interrupt...")); dmpReady = true; // get expected DMP packet size for later comparison packetSize = mpu.dmpGetFIFOPacketSize(); } else { // ERROR! // 1 = initial memory load failed // 2 = DMP configuration updates failed // (if it's going to break, usually the code will be 1) Serial.print(F("DMP Initialization failed (code ")); Serial.print(devStatus); Serial.println(F(")")); } // configure LED for output pinMode(LED_PIN, OUTPUT); } void loop() { //Yeşil renk elde etmek için... analogWrite(R,0); analogWrite(G,255); analogWrite(B,0); //Serial.print("Sicaklik = "); Serial.print(bmp.readTemperature()); //Serial.println(" *C"); //Serial.print("Basinc = "); Serial.print(bmp.readPressure()); //Serial.println(" Pa"); //Serial.print("Yukseklik = "); Serial.print(bmp.readAltitude()); //Serial.println(" metre"); //Serial.print("Deniz seviyesinde basinc = "); Serial.print(bmp.readSealevelPressure()); //Serial.println(" Pa"); //Serial.print("Gercek Yukseklik = "); Serial.print(bmp.readAltitude(seaLevelPressure_hPa * 100)); //Serial.println(" metre"); Serial.println(""); // if programming failed, don't try to do anything if (!dmpReady) return; // wait for MPU interrupt or extra packet(s) available while (!mpuInterrupt && fifoCount < packetSize) { // other program behavior stuff here // . // . // . // if you are really paranoid you can frequently test in between other // stuff to see if mpuInterrupt is true, and if so, "break;" from the // while() loop to immediately process the MPU data // . // . // . } // reset interrupt flag and get INT_STATUS byte mpuInterrupt = false; mpuIntStatus = mpu.getIntStatus(); // get current FIFO count fifoCount = mpu.getFIFOCount(); // check for overflow (this should never happen unless our code is too inefficient) if ((mpuIntStatus & 0x10) || fifoCount == 1024) { // reset so we can continue cleanly mpu.resetFIFO(); Serial.println(F("FIFO overflow!")); // otherwise, check for DMP data ready interrupt (this should happen frequently) } else if (mpuIntStatus & 0x02) { // wait for correct available data length, should be a VERY short wait while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount(); // read a packet from FIFO mpu.getFIFOBytes(fifoBuffer, packetSize); // track FIFO count here in case there is > 1 packet available // (this lets us immediately read more without waiting for an interrupt) fifoCount -= packetSize; #ifdef OUTPUT_READABLE_QUATERNION // display quaternion values in easy matrix form: w x y z mpu.dmpGetQuaternion(&q, fifoBuffer); Serial.print("quat\t"); Serial.print(q.w); Serial.print("\t"); Serial.print(q.x); Serial.print("\t"); Serial.print(q.y); Serial.print("\t"); Serial.println(q.z); #endif #ifdef OUTPUT_READABLE_EULER // display Euler angles in degrees mpu.dmpGetQuaternion(&q, fifoBuffer); mpu.dmpGetEuler(euler, &q); Serial.print("euler\t"); Serial.print(euler[0] * 180/M_PI); Serial.print("\t"); Serial.print(euler[1] * 180/M_PI); Serial.print("\t"); Serial.println(euler[2] * 180/M_PI); #endif #ifdef OUTPUT_READABLE_YAWPITCHROLL // display Euler angles in degrees mpu.dmpGetQuaternion(&q, fifoBuffer); mpu.dmpGetGravity(&gravity, &q); mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); Serial.print("ypr\t"); Serial.print(ypr[0] * 180/M_PI); Serial.print("\t"); Serial.print(ypr[1] * 180/M_PI); //Output to servo myservo.write(180-(90+ ypr[2] * 180/M_PI)); myservo2.write(180-(90+ ypr[1] * 180/M_PI)); Serial.print("\t"); Serial.println(ypr[2] * 180/M_PI); #endif #ifdef OUTPUT_READABLE_REALACCEL // display real acceleration, adjusted to remove gravity mpu.dmpGetQuaternion(&q, fifoBuffer); mpu.dmpGetAccel(&aa, fifoBuffer); mpu.dmpGetGravity(&gravity, &q); mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity); Serial.print("areal\t"); Serial.print(aaReal.x); Serial.print("\t"); Serial.print(aaReal.y); Serial.print("\t"); Serial.println(aaReal.z); #endif #ifdef OUTPUT_READABLE_WORLDACCEL // display initial world-frame acceleration, adjusted to remove gravity // and rotated based on known orientation from quaternion mpu.dmpGetQuaternion(&q, fifoBuffer); mpu.dmpGetAccel(&aa, fifoBuffer); mpu.dmpGetGravity(&gravity, &q); mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity); mpu.dmpGetLinearAccelInWorld(&aaWorld, &aaReal, &q); Serial.print("aworld\t"); Serial.print(aaWorld.x); Serial.print("\t"); Serial.print(aaWorld.y); Serial.print("\t"); Serial.println(aaWorld.z); #endif #ifdef OUTPUT_TEAPOT // display quaternion values in InvenSense Teapot demo format: teapotPacket[2] = fifoBuffer[0]; teapotPacket[3] = fifoBuffer[1]; teapotPacket[4] = fifoBuffer[4]; teapotPacket[5] = fifoBuffer[5]; teapotPacket[6] = fifoBuffer[8]; teapotPacket[7] = fifoBuffer[9]; teapotPacket[8] = fifoBuffer[12]; teapotPacket[9] = fifoBuffer[13]; Serial.write(teapotPacket, 14); teapotPacket[11]++; // packetCount, loops at 0xFF on purpose #endif // blink LED to indicate activity blinkState = !blinkState; digitalWrite(LED_PIN, blinkState); } }
  9. Hello and thanks in advance for the great library, I'm planning to use the MPU6050 as the IMU of my university rocket team's 3km apogee rocket for telemetry. The problem is, it means that I would have to use the 16g range of the accelerometer. It's desirable to use the device's DMP as it's the most precise and hassle-free solution, but I didn't seem to find a way to set the device's range to 16g while using its DMP. I tried modifying the teapot example to include the line mpu.setFullScaleAccelRange(MPU6050_ACCEL_FS_16); after the device initialization and after the DMP initialization but it didn't work. Is it possible? If no, what method would you recommend for processing the raw data? Or even, is there a better solution than the MPU6050 for my application? I've looked at the BNO055, but unfortunately that chip is too expensive for my team compared to the MPU. I'm using an Arduino nano for development with PlatformIO (VS Code). We plan to use the ESP32 as our micro.
  10. I am facing the exact same issue, did you find a solution to this? Any suggestions will be a great help. Thanks in advance.
  11. No one to help??? how do i get this fault eliminated?
  12. Dear, I try to restore a friends machine, that drives over un-level ground and need to hold a vertical device always perfectly vertical using 1x 12VDC motor. Stabilization is done on 1 axis. Not 2 I believe. His former old friend build a Arduino Uno board with on top a DUALCHANNEL H-BRIDGE motor shield from ELECROW.COM and on top of that board a prototype shield v.5 board containing a GY-521 sensor ( MPU 6050 I believe). We managed to get his old code back via relatives of his former friend who look like this : #include "I2Cdev.h" #include "MPU6050_6Axis_MotionApps20.h" #include "PID_v1.h" // Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation // is used in I2Cdev.h #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE #include "Wire.h" #endif MPU6050 mpu; // MPU control/status vars bool dmpReady = false; // set true if DMP init was successful uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU uint8_t devStatus; // return status after each device operation (0 = success, !0 = error) uint16_t packetSize; // expected DMP packet size (default is 42 bytes) uint16_t fifoCount; // count of all bytes currently in FIFO uint8_t fifoBuffer[64]; // FIFO storage buffer // orientation/motion vars Quaternion q; // [w, x, y, z] quaternion container VectorFloat gravity; // [x, y, z] gravity vector float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector // PID double kp = 20, ki = 0, kd = 0; double Setpoint = 0; // leveled double Input = 0, Output = 0; PID PID1(&Input, &Output, &Setpoint, kp, ki, kd, DIRECT); // ================================================================ // === INTERRUPT DETECTION ROUTINE === // ================================================================ volatile bool mpuInterrupt = false; // indicates whether MPU interrupt pin has gone high void dmpDataReady() { mpuInterrupt = true; } void setup() { // join I2C bus (I2Cdev library doesn't do this automatically) #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE Wire.begin(); TWBR = 24; // 400kHz I2C clock (200kHz if CPU is 8MHz) #elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE Fastwire::setup(400, true); #endif // initialize serial communication Serial.begin(115200); // initialize DMP devStatus = mpu.dmpInitialize(); // Offsets for calibrating mpu.setXGyroOffset(220); mpu.setYGyroOffset(76); mpu.setZGyroOffset(-85); mpu.setZAccelOffset(1788); // 1688 factory default // make sure it worked (returns 0 if so) if (devStatus == 0) { // turn on the DMP, now that it's ready Serial.println(F("Enabling DMP...")); mpu.setDMPEnabled(true); // enable Arduino interrupt detection Serial.println(F("Enabling interrupt detection (Arduino external interrupt 0)...")); attachInterrupt(0, dmpDataReady, RISING); mpuIntStatus = mpu.getIntStatus(); // set our DMP Ready flag so the main loop() function knows it's okay to use it Serial.println(F("DMP ready! Waiting for first interrupt...")); dmpReady = true; // get expected DMP packet size for later comparison packetSize = mpu.dmpGetFIFOPacketSize(); } else { // ERROR! // 1 = initial memory load failed // 2 = DMP configuration updates failed // (if it's going to break, usually the code will be 1) Serial.print(F("DMP Initialization failed (code ")); Serial.print(devStatus); Serial.println(F(")")); } // Motor_1 controll pin initiate; pinMode(4, OUTPUT); pinMode(5, OUTPUT); pinMode(9, OUTPUT); // Speed control //Enable the Motor Shield output; pinMode(6, OUTPUT); digitalWrite(6, HIGH); //PID initiate PID1.SetMode(AUTOMATIC); PID1.SetSampleTime(1); PID1.SetOutputLimits(-255, 255); } void loop() { //If programming failed, don't try to do anything if (!dmpReady) return; // wait for MPU interrupt or extra packet(s) available while (!mpuInterrupt && fifoCount < packetSize) { // other program behavior stuff here // . // . // . // if you are really paranoid you can frequently test in between other // stuff to see if mpuInterrupt is true, and if so, "break;" from the // while() loop to immediately process the MPU data // . // . // . } // reset interrupt flag and get INT_STATUS byte mpuInterrupt = false; mpuIntStatus = mpu.getIntStatus(); // get current FIFO count fifoCount = mpu.getFIFOCount(); // check for overflow (this should never happen unless our code is too inefficient) if ((mpuIntStatus & 0x10) || fifoCount == 1024) { // reset so we can continue cleanly mpu.resetFIFO(); Serial.println(F("FIFO overflow!")); // otherwise, check for DMP data ready interrupt (this should happen frequently) } else if (mpuIntStatus & 0x02) { // wait for correct available data length, should be a VERY short wait while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount(); // read a packet from FIFO mpu.getFIFOBytes(fifoBuffer, packetSize); // track FIFO count here in case there is > 1 packet available // (this lets us immediately read more without waiting for an interrupt) fifoCount -= packetSize; mpu.dmpGetQuaternion(&q, fifoBuffer); mpu.dmpGetGravity(&gravity, &q); mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); Input = ypr[2] * 180 / M_PI; PID1.Compute(); //Output to motor shield control_motor(Output); //Display Euler angles in degrees Serial.print("ypro\t"); Serial.print(ypr[0] * 180 / M_PI); Serial.print("\t"); Serial.print(ypr[1] * 180 / M_PI); Serial.print("\t"); Serial.print(ypr[2] * 180 / M_PI); Serial.print("\t"); Serial.println(Output); } } void control_motor(double pwm_value) { int pwm = round(pwm_value); if (pwm < -255) pwm = -255; if (pwm > 255) pwm = 255; if (pwm > 0) { //Set the motor direction CW digitalWrite(4, LOW); digitalWrite(5, HIGH); analogWrite(9, pwm); //Set the motor speed } else { //Set the motor direction CCW digitalWrite(4, HIGH); digitalWrite(5, LOW); analogWrite(9, pwm); } } But once I connect my arduino uno board and launch the program I get this error message: Arduino: 1.8.13 (Windows 7), Board:"Arduino Uno" V2:1:10: fatal error: I2Cdev.h: No such file or directory #include "I2Cdev.h" ^~~~~~~~~~ compilation terminated. exit status 1 I2Cdev.h: No such file or directory ZIP file does not contain a map or valid library What do I need to do? Thanks for any help. Very welcome when you don't have any arduino experiences !!! Kind regards,
  13. hello.... first I would like to thank all of the people that built such a great library to make mpu6050 sensor easy to use. I'm currently working on measuring joint angle based on two IMU sensors (mpu6050). I managed to get the quaternion values of each sensor and convert it to euler angles using dmp FIFO. But I have a question about the library "MPU6050_6Axis_MotionApps20.h". Does it depends on Kalman Filter or what?.
  14. Pleaaase I would like to work with three MPU-6050 acelerometers too. Did someone get the answer? :(
  15. Hello, I am currently trying to make a mod to my motorcycle with the MPU 6050 that allows me to turn on one of the two side lights that I have installed depending on the inclination of the motorcycle, so if I lean to the right 10 degrees to take a curve, a relay turn on the right light to illuminate the curve. I would like it to be using the DPM6 to obtain accurate measurements, the idea is that everything is controlled with a button that has another function, that is, that button if you press it once turns on the garage door opener, that is already done , now I need to make that if you hold it down for 3 seconds, the side lights are activated, and that they go on depending on the inclination as I have already explained before. I know what I ask for is very complicated, but I am new to arduino and I have no idea how to make this work.
  16. (I'm assuming you're using Arduino processors, which may not be true) regarding your 1): Suggest you look at sample code at https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/examples/MPU6050_DMP6/MPU6050_DMP6.ino and in particular, the routine mpu.dmpGetCurrentFIFOPacket(fifoBuffer) which greatly simplifies the work needed to read from the fifo. Also suggest verifying your libraries have this fix: https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/MPU6050.cpp Cheers, Nerdoug.
  17. Perhaps this bug fix in the MPU6050 library might be relevant to your problems: https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/MPU6050.cpp Cheers, Nerdoug
  18. Hello, I am trying to use i2cdevlib library to operate MPU6050. I don't understand why do we have to connect interrupt pin if it is not used in the examples? They are working even with that pin disconnected.
  19. Thanks for the heads-up. It's fixed now...it was a long-deprecated use of an array element mapping function, where the syntax that used to work now requires quotes. Simple enough, thankfully.
  20. http://www.i2cdevlib.com/devices/mpu6050 is completely dead. Please fix
  21. Hi, I currently have the lib running with a ESP32. I want to use this setup for a sensor attached to a bicycle crank in order to measure the rotational speed. I understand that the output of the sensor is angular velocity from which I can calculate rotational speed at any time. Is there anything to consider for this use case? Any examples or a short descriptions what APIS of the lib to use? Thanks D
  22. I am using MPU6050 ,it is constantly giving output even after keeping it at one place
  23. Hi there, i have some errors using I2Cdev.h and MPU6050_6Axis_MotionApps20.h at compiling/check in Arduino IDE Arduino IDE version: 1.89 I have no idea what causes those errors... Can someone help please? Thank you in advance... Errors: 1. \Arduino\libraries\MPU6050/MPU6050.h:436:7: warning: type 'struct MPU6050' violates one definition rule [-Wodr] class MPU6050 { 2. \Arduino\libraries\MPU6050\MPU6050.h:436:7: note: a different type is defined in another translation unit class MPU6050 { 3. \Arduino\libraries\MPU6050/MPU6050.h:1036:18: note: the first difference of corresponding definitions is field 'dmpPacketBuffer' uint8_t *dmpPacketBuffer; 4. \Arduino\libraries\MPU6050\MPU6050.h:436:7: note: a type with different number of fields is defined in another translation unit class MPU6050 {
  24. Hi....They couldn't initialize and the problem was bad soldering of MPU6050 chip. So I tried to resolder it and it worked, but then it stopped, and I had to redo it again.I've ended up buying sole chips without pcb, because it seems for some reason they can't properly solder them.Or maybe it's just bad quality of counterfeit chips that are just working for their price. seo toronto
  25. Firstly a big thanks for all the effort to make the MPU library so smoothly! Like others, we have an MPU6050 in a different orientation to the default and we have a partial solution by applying rotations to the output. However we have noted that the DMP gets confused, that is it seems to give out inconsistent data and tries to reset itself to what I assume is datum. In Motion Driver 6.12 – User Guide p9 it describes "The Orientation Matrix" and states that it will "reconfigure the physical hardware sensor axis to the to the device coordinates. A wrong configuration will get you inaccurate results from the sensors data." and also that "The matrixes will be pushed into both the MPL library and DMP for fusion calculations." What I can't find is any reference to setting those, either in the MPU or the DMP - I'm assuming it might be part of the downloaded code of the DMP in MPU6050_6Axis_MotionApps20.h ( or should we be using the v6.1 version in the Arduino project... but that's a separate question ) I've no idea where to start to find the information as to where that matrix is. Any hints or ideas welcome!
  1. Load more activity
×
×
  • Create New...