Jump to content
I2Cdevlib Forums

All Activity

This stream auto-updates     

  1. Last week
  2. 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
  3. Earlier
  4. 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?
  5. 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
  6. niharika

    msp430fr5994 with icm 20948

    Hi All, I am working with msp430fr5994 with ICM 20948 interfacing with i2c . I am trying to read accelerometer values and gyroscope axis values .But I am not able to read .may I know why this happened Thanks&Regards NIHARIKA
  7. 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
  8. 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).
  9. 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
  10. 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
  11. #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
  12. your Office www.office.com/setup, Office Setup with Product key, Install office 2019 setup & office 365 setup.
  13. 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!
  14. 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
  15. I didn't understand what you meant by update interval. Where and how do you change that?
  16. 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.
  17. Yggdrasil.Sun

    Example code MPU6050_DMP6

    INT of MPU6050 must connect PIN 2 of Arduino
  18. 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
  19. 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
  20. 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
  21. 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
  22. Have you been able to work this out? I need a program for school that gives me an interrupt when a person with this sensor attached to his waist falls, and only when it gives an interrupt does it have to read sensor values. I can't however find a solution for this, was hoping you could help.
  23. Rjsamat

    Help needed

    Hi every one is there some can help me in my project. I'm trying to make a DSLR gimble with a 2 servo motors. Gs90 and I have a arduino nano board and a MMA845x accelerometer with a joystick I need motors to stay in position that I stop and seep steddy and joystick to control the roll and the pitch. Please if anyone can give me code for this it will be big help. This gimbal is for my own use not for any youtube or any blog.
  24. Dear Susan, renrr3, jrlin and anyone who might be confused about these calculations on the calibration function: I came upon this problem while trying to calibrate the sensor with a +/-16G range. It turns out that these constants rescale the offsets for the selected sensibility, as the values returned by the MPU6050 are in the maximum range. So, for a +/-2G accelerometer range (standard) it's necessary to divide the coefficients by 8 (16G/8 = 2G) and the gyroscope ones by 4 for a standard sensibility of 250dps (1000dps/4 = 250dps). In order to calibrate the sensor properly, I also had to change the constants 16384 by 2048. This is because the chip provides values between -32,768 and 32,767. With a range of 2G, the gravity acceleration is equivalent to the number 16384 (32767/2). If the range is 16G, then 1G is 2048 (32767/16). This explanation was provided by arduarn in the Arduino forum. You can check the original discussion here http://forum.arduino.cc/index.php?topic=535717 Best wishes,
  25. Once powered up is there a way to tap any value from the Gyroscope before it goto the serial bus?
  26. Hi All, I have down loaded all library file to run the above code, It compiles and down loads OK . When I run the sketch it stops with the message " MPU Connection failed" followed by "Send any character to begin the DMP demo". Then nothing. I have checked all wiring(at least 6 times) and the I2C address of the device which is 0x68. Help! Regards John
  1. Load more activity
×