Jump to content
I2Cdevlib Forums

All Activity

This stream auto-updates     

  1. Last week
  2. Earlier
  3. im creating my own Controller and quadcopter and i always run into a the question of "how do you filter your gyro and Acc and use them together to get a Angle" . My question is, do i need to filter the Acc and Gyro or is the OUTPUT_READABLE_YAWPITCHROLL just a filter that Uses both acc and gyro to produce the Angles? what i want to do is use both Acc and Gyro to create an angle that i will use for a PID controller to balance the quad but if the OUTPUT_READABLE_YAWPITCHROLL already does that, than that would be unnecessary.
  4. I don't get why this might make a difference ! Can you please explain ?
  5. I've got something like 500 samples/sec with direct register access using I2C and 170 samples/s using DMP provided by i2cDev. So in my opinion you'll have a bottleneck somewhere else!
  6. Hello. I am using an Arduino Mega 2560 with Data logging shield v1.0 and as a sensor mpu 6050. I am facing a problem with setting the corrct time to thr RTC and also with low sampling rate and to more specific, in my csv file i take only 23-25 values/sec. Can anyone please help me to explain how I can reach 80-100 values / sec ? Thanks in advance
  7. hi im now working o same thing....measure position from acceleration did you done this work?.....i have doubt to do that because i dont know it can be done or not?? can you share your experience please?
  8. hi i hope you have done this so far but i share my work... i transfer mpu6050 data's to computer with NodeMcu esp8266 it is one of the easiest way to do that wireless because NodeMcu had wifi i used MPU6050_DMP6_ESPWiFi example of Jeff Rowberg's mpu6050 library....you must use a hotspot to connect your computer and mpu6050 with this example i hope this can help you... even though i am trying to measure position data of mpu6050 from acceleration for a game on unity but i can not so far MPU6050_DMP6_ESPWiFi.ino
  9. niharika

    msp430fr5994 with icm 20948

    Hi All, Hello, I am working with ICM 20948 with MSP430FR5994 interfacing with I2C. According to my application I want that whenever a user defined threshold value is crossed it should give interrupt .For that I am enabling WAKE ON MOTION INTERRUPT and giving threshold value to the register .But I am not getting interrupt . Can u please help me I am attaching my code and added comments so that u can understand how I initialized and reply me as soon as possible if there is anything wrong in initialization. I wanted to know how to set threshold value in register is there any formula to set threshold value. Thanks&Regards NIHARIKA main.c icm.c
  10. Kraken Customer Support Phone Number 1(888) 287-8183. This is a US-based Bitcoin exchange. Make a call to the team. when you are facing the issue of the market. a better way to get instant solution for every solution. Kraken Support Number .this is famous cryptocurrency exchange accessed by people around the world.its operates in Canada, us EU, Japan.when you any issue like login page not working. user unable to view a transaction of account
  11. I2c library is not working on arduino Due. I comment the TWR line as mentioned in other post. When I compiled the program, I received this error as shown in picture. Can anyone please help me? C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp: In member function 'void MPU6050::PID(uint8_t, float, float, uint8_t)': C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3258:65: error: invalid conversion from 'int16_t* {aka short int*}' to 'uint16_t* {aka short unsigned int*}' [-fpermissive] I2Cdev::readWords(devAddr, SaveAddress + (i * shift), 1, &Data); // reads 1 or more 16 bit integers (Word) ^ In file included from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:40:0, from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:38: C:\Program Files (x86)\Arduino\libraries\I2Cdev/I2Cdev.h:115:23: error: initializing argument 4 of 'static int8_t I2Cdev::readWords(uint8_t, uint8_t, uint8_t, uint16_t*, uint16_t)' [-fpermissive] static int8_t readWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data, uint16_t timeout=I2Cdev::readTimeout); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3272:63: error: invalid conversion from 'int16_t* {aka short int*}' to 'uint16_t* {aka short unsigned int*}' [-fpermissive] I2Cdev::readWords(devAddr, ReadAddress + (i * 2), 1, &Data); // reads 1 or more 16 bit integers (Word) ^ In file included from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:40:0, from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:38: C:\Program Files (x86)\Arduino\libraries\I2Cdev/I2Cdev.h:115:23: error: initializing argument 4 of 'static int8_t I2Cdev::readWords(uint8_t, uint8_t, uint8_t, uint16_t*, uint16_t)' [-fpermissive] static int8_t readWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data, uint16_t timeout=I2Cdev::readTimeout); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3283:69: error: invalid conversion from 'int16_t* {aka short int*}' to 'uint16_t* {aka short unsigned int*}' [-fpermissive] I2Cdev::writeWords(devAddr, SaveAddress + (i * shift), 1, &Data); ^ In file included from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:40:0, from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:38: C:\Program Files (x86)\Arduino\libraries\I2Cdev/I2Cdev.h:124:21: error: initializing argument 4 of 'static bool I2Cdev::writeWords(uint8_t, uint8_t, uint8_t, uint16_t*)' [-fpermissive] static bool writeWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3301:68: error: invalid conversion from 'int16_t* {aka short int*}' to 'uint16_t* {aka short unsigned int*}' [-fpermissive] I2Cdev::writeWords(devAddr, SaveAddress + (i * shift), 1, &Data ); ^ In file included from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:40:0, from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:38: C:\Program Files (x86)\Arduino\libraries\I2Cdev/I2Cdev.h:124:21: error: initializing argument 4 of 'static bool I2Cdev::writeWords(uint8_t, uint8_t, uint8_t, uint16_t*)' [-fpermissive] static bool writeWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp: In member function 'void MPU6050::PrintActiveOffsets()': C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3315:81: error: invalid conversion from 'int16_t* {aka short int*}' to 'uint16_t* {aka short unsigned int*}' [-fpermissive] if(AOffsetRegister == 0x06) I2Cdev::readWords(devAddr, AOffsetRegister, 3, Data); ^ In file included from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:40:0, from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:38: C:\Program Files (x86)\Arduino\libraries\I2Cdev/I2Cdev.h:115:23: error: initializing argument 4 of 'static int8_t I2Cdev::readWords(uint8_t, uint8_t, uint8_t, uint16_t*, uint16_t)' [-fpermissive] static int8_t readWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data, uint16_t timeout=I2Cdev::readTimeout); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3317:54: error: invalid conversion from 'int16_t* {aka short int*}' to 'uint16_t* {aka short unsigned int*}' [-fpermissive] I2Cdev::readWords(devAddr, AOffsetRegister, 1, Data); ^ In file included from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:40:0, from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:38: C:\Program Files (x86)\Arduino\libraries\I2Cdev/I2Cdev.h:115:23: error: initializing argument 4 of 'static int8_t I2Cdev::readWords(uint8_t, uint8_t, uint8_t, uint16_t*, uint16_t)' [-fpermissive] static int8_t readWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data, uint16_t timeout=I2Cdev::readTimeout); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3318:56: error: invalid conversion from 'int16_t* {aka short int*}' to 'uint16_t* {aka short unsigned int*}' [-fpermissive] I2Cdev::readWords(devAddr, AOffsetRegister+3, 1, Data+1); ^ In file included from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:40:0, from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:38: C:\Program Files (x86)\Arduino\libraries\I2Cdev/I2Cdev.h:115:23: error: initializing argument 4 of 'static int8_t I2Cdev::readWords(uint8_t, uint8_t, uint8_t, uint16_t*, uint16_t)' [-fpermissive] static int8_t readWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data, uint16_t timeout=I2Cdev::readTimeout); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3319:56: error: invalid conversion from 'int16_t* {aka short int*}' to 'uint16_t* {aka short unsigned int*}' [-fpermissive] I2Cdev::readWords(devAddr, AOffsetRegister+6, 1, Data+2); ^ In file included from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:40:0, from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:38: C:\Program Files (x86)\Arduino\libraries\I2Cdev/I2Cdev.h:115:23: error: initializing argument 4 of 'static int8_t I2Cdev::readWords(uint8_t, uint8_t, uint8_t, uint16_t*, uint16_t)' [-fpermissive] static int8_t readWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data, uint16_t timeout=I2Cdev::readTimeout); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3308:196: error: 'dtostrf' was not declared in this scope #define printfloatx(Name,Variable,Spaces,Precision,EndTxt) Serial.print(F(Name)); {char S[(Spaces + Precision + 3)];Serial.print(F(" ")); Serial.print(dtostrf((float)Variable,Spaces,Precision ,S));}Serial.print(F(EndTxt));//Name,Variable,Spaces,Precision,EndTxt ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3322:2: note: in expansion of macro 'printfloatx' printfloatx("", Data[0], 5, 0, ", "); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3308:196: error: 'dtostrf' was not declared in this scope #define printfloatx(Name,Variable,Spaces,Precision,EndTxt) Serial.print(F(Name)); {char S[(Spaces + Precision + 3)];Serial.print(F(" ")); Serial.print(dtostrf((float)Variable,Spaces,Precision ,S));}Serial.print(F(EndTxt));//Name,Variable,Spaces,Precision,EndTxt ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3323:2: note: in expansion of macro 'printfloatx' printfloatx("", Data[1], 5, 0, ", "); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3308:196: error: 'dtostrf' was not declared in this scope #define printfloatx(Name,Variable,Spaces,Precision,EndTxt) Serial.print(F(Name)); {char S[(Spaces + Precision + 3)];Serial.print(F(" ")); Serial.print(dtostrf((float)Variable,Spaces,Precision ,S));}Serial.print(F(EndTxt));//Name,Variable,Spaces,Precision,EndTxt ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3324:2: note: in expansion of macro 'printfloatx' printfloatx("", Data[2], 5, 0, ", "); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3325:42: error: invalid conversion from 'int16_t* {aka short int*}' to 'uint16_t* {aka short unsigned int*}' [-fpermissive] I2Cdev::readWords(devAddr, 0x13, 3, Data); ^ In file included from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.h:40:0, from C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:38: C:\Program Files (x86)\Arduino\libraries\I2Cdev/I2Cdev.h:115:23: error: initializing argument 4 of 'static int8_t I2Cdev::readWords(uint8_t, uint8_t, uint8_t, uint16_t*, uint16_t)' [-fpermissive] static int8_t readWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data, uint16_t timeout=I2Cdev::readTimeout); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3308:196: error: 'dtostrf' was not declared in this scope #define printfloatx(Name,Variable,Spaces,Precision,EndTxt) Serial.print(F(Name)); {char S[(Spaces + Precision + 3)];Serial.print(F(" ")); Serial.print(dtostrf((float)Variable,Spaces,Precision ,S));}Serial.print(F(EndTxt));//Name,Variable,Spaces,Precision,EndTxt ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3327:2: note: in expansion of macro 'printfloatx' printfloatx("", Data[0], 5, 0, ", "); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3308:196: error: 'dtostrf' was not declared in this scope #define printfloatx(Name,Variable,Spaces,Precision,EndTxt) Serial.print(F(Name)); {char S[(Spaces + Precision + 3)];Serial.print(F(" ")); Serial.print(dtostrf((float)Variable,Spaces,Precision ,S));}Serial.print(F(EndTxt));//Name,Variable,Spaces,Precision,EndTxt ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3328:2: note: in expansion of macro 'printfloatx' printfloatx("", Data[1], 5, 0, ", "); ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3308:196: error: 'dtostrf' was not declared in this scope #define printfloatx(Name,Variable,Spaces,Precision,EndTxt) Serial.print(F(Name)); {char S[(Spaces + Precision + 3)];Serial.print(F(" ")); Serial.print(dtostrf((float)Variable,Spaces,Precision ,S));}Serial.print(F(EndTxt));//Name,Variable,Spaces,Precision,EndTxt ^ C:\Program Files (x86)\Arduino\libraries\MPU6050\MPU6050.cpp:3329:2: note: in expansion of macro 'printfloatx' printfloatx("", Data[2], 5, 0, "\n"); ^ exit status 1 Error compiling for board Arduino Due (Native USB Port).
  12. Hi everybody. I am trying to use the dmp of the mpu 6050. I am using an arduino nano and windows 10. Also I am using the sketch "MPU6050_DMP6.ino" with almost no changes. When I run the sketch the dmp initializes correctly, but then, when it shows the quaternion´s components it only shows zeros, besides the fifo is overflown once evey 14 printed values. Similar problems occur when i try to get euler angles or yaw, pitch and roll. Any idea of what may be happening? or what i could do? Thanks a lot! The code i am using is posted in https://pastebin.com/HHL0d3WW
  13. Hello. I am using MPU 6050 with Arduino Uno r3. I also use DS1302 rtc and catalex microSD card adapter. I am facing a problem with low sampling rate and to be more specific, in my csv file i take only 30-35 values/sec. Can anyone please help me to explain how I can reach 80-100 values / sec ? Thanks in advance
  14. #ifdef OUTPUT_READABLE_WORLDACCEL #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 I want to ask that what is the unit of above aaWorld values ? I understand that if i need to get the acceleration without gravity i need to use these values , but the values that we get from these are in m/s^2? or do i need to do something acc_in_ms2=(aaWorld.x*9.8)/16384.0 ? or something else. my offset are as follows mpu.setXGyroOffset(220); mpu.setYGyroOffset(76); mpu.setZGyroOffset(6); mpu.setZAccelOffset(1262); and my output is as follows without doing any changes in code provided after 10-15 sec (the sensor is horizontal) aworld 0 28 60 aworld -1 29 40 aworld 5 29 33 aworld 6 24 20 aworld 2 23 22 aworld -4 13 26 aworld -6 11 28 aworld -10 11 30 aworld -15 5 38 aworld -7 -1 36 aworld 7 -4 37 aworld 7 0 33 aworld 4 5 29 aworld 0 2 30 aworld -3 -7 35 seems coreect all the values converging to zeros.. but when i move the sensor in one direction , i get totally unexpected values.. aworld -415 -306 304 aworld -505 -277 318 aworld -577 -270 399 aworld -587 -207 265 aworld -572 -166 63 aworld -589 -200 -28 aworld -631 -258 -7 aworld -638 -292 30 aworld -637 -334 29 aworld -647 -404 -23 aworld -640 -483 -75 aworld -611 -542 -72 aworld -633 -503 -24 aworld -723 -344 17 aworld -816 -125 36 aworld -908 72 1 aworld -988 241 -45 aworld -1015 378 -68 I am moving the sesor only to and fro in one direction but i am getting these values Why so? please help if you have any information /knowledge about this... I want acceleration mithout gravity affect in m/s^2
  15. your Office www.office.com/setup, Office Setup with Product key, Install office 2019 setup & office 365 setup.
  16. Hello everyone. I'm quite new to Arduino and i2c so please bear with me even if my questions may have an obvious answer from your point of view. Looking at the example of 6 axis MPU 6050 I'm trying to wrap my head around some programming decision that was made, specifically: 1) Why do we run while loop while (!mpuInterrupt && fifoCount < packetSize) { inside the main Arduino loop() instead of just simply running single interrupt flag and fifoCount check each iteration of the loop(), is that to catch new data package as absolutely soon as possible? 2) Why do we use interrupt at all, can't we just check getFIFOCount() and if > packetSize - retrieve data. I've modified the example to do just that and it seems that data is still fine, nothing borked e.t.c. I might be missing the whole point of using interrupts here, please clarify this for me if possible. Thanks in advance!
  17. AndieDini

    Using I2CXL-MaxSonar-EZ and MPU6050 together

    Hi... I suggest that you modify the MaxSonar softi2cmaster code that you know works in such a way that you can use it together with i2cdevlib running in softi2cmaster mode. (You will need i2cdevlib for the MPU6050 later) SoftI2CMaster.h can only be #included once in a program, so I made the class SoftI2CMasterWire that exports the functions of SoftI2CMaster.h so other parts of the program can use them. printed circuit board assembly
  18. I didn't understand what you meant by update interval. Where and how do you change that?
  19. user can dial for outlook Support Phone Number.outlook care helpline to permanently all concerns.merchant can touch with a professional technical expert and the fastest recovery for all problems.you will be quick support for all any services of outlook form expert team. call 24/7 any time when you found any error of any microsoft.this services provides free no pay charges. Microsoft Support Phone Number for instant help.the expert team contact by dial outlook Customer Service Number and resolve all kind of problem of Microsoft.
  20. Yggdrasil.Sun

    Example code MPU6050_DMP6

    INT of MPU6050 must connect PIN 2 of Arduino
  21. Yggdrasil.Sun

    Arduino mega control 3 MPU6050

    Hi everyone My graduation project is the design of robot arm. now I need three ATK-MPU6050 to solve problem of pulse losing of step motor, So I need angle data through DMP. I can run example of MPU6050_DMP to control one ATK-MPU6050, but it can't meet my needs. I need a class of mpu6050 and angle data through DMP. If you know how to control three ATK-MPU6050,I will appreciate you
  22. Hello everyone. Thanks for your explanation jeff. I am building a robot that will drive straight and i intend to use the yaw angle error to make that happen. Right now I am at the yaw angle reading stage. I used the calibration sketch (attached below) and got the offsets. Then i plugged those offsets into DMP6 example of Jeff Rowberg library (thanks to jeff). I was expecting 0 readings for yaw, pitch and roll as i had held it still all the while. But the readings were 49.6(y) 0.6(p) -2.81(r). Can anyone tell me what might be the error? I did notice the comment above the offset setting part of dmp6 saying "supply your own offsets here, scaled to minimum sensitivity." Can the reason be that my sensitivity factor is not correct? // 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 Can that be the reason? Tahnks in advance. MPU6050_calibration.ino
  23. Problem solved. bus.write_byte_data(0x68, 0x1C, 0x00) 2g bus.write_byte_data(0x68, 0x1C, 0x08) 4g bus.write_byte_data(0x68, 0x1C, 0x10) 8g bus.write_byte_data(0x68, 0x1C, 0x18) 16g
  24. import smbus import time # Get I2C bus bus = smbus.SMBus(1) # MPU-6000 address, 0x68(104) # Select gyroscope configuration register, 0x1B(27) # 0x18(24) Full scale range = 2000 dps bus.write_byte_data(0x68, 0x1B, 0x18) # MPU-6000 address, 0x68(104) # Select accelerometer configuration register, 0x1C(28) # 0x18(24) Full scale range = +/-16g bus.write_byte_data(0x68, 0x1C, 0x18) # MPU-6000 address, 0x68(104) # Select power management register1, 0x6B(107) # 0x01(01) PLL with xGyro reference bus.write_byte_data(0x68, 0x6B, 0x01) I wish to convert the measurement range from +-16g of the accelerometer to +-2g and 2000dps of the gyroscope to 250dps. Any Gurus can help me on this? This is the register map for MPU 6050 https://www.invensense.com/wp-content/u ... r-Map1.pdf
  1. Load more activity
×