Forum Rule: Always post complete source code & details to reproduce any issue!
Page 11 of 11 FirstFirst ... 9 10 11
Results 251 to 260 of 260

Thread: MPU-9250 Teensy Library

  1. #251
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    702
    I just updated the library with an increased delayNanoseconds time, should hopefully be a little more robust now.

  2. #252
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,429
    Quote Originally Posted by brtaylor View Post
    I just updated the library with an increased delayNanoseconds time, should hopefully be a little more robust now.
    Hi Brian - thanks for making the change but no joy as they say.

    I tested 3 MPU-9250 breakout boards I pick up off of ebay and amazon ( https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1) all 3 work with your lib version I posted but fail at 2 different spots in the begin:
    1. 1 fails at reading the MPU9250 whoAmI - gets 0x72 vs 0x73 or 0x75
    and
    2. The other 2 fail when it tries to enable I2C mode.

    Will do a little more digging - in the middle of somthing that I want to finish before I forget what I had to do

  3. #253
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,429
    Quote Originally Posted by brtaylor View Post
    I just updated the library with an increased delayNanoseconds time, should hopefully be a little more robust now.
    Sorry for the late night reply - well - I got it working with one minor change on the T4.1 and T3.2 with one minor change but when I did some regression testing with an Uno or mega it failed - the old version did run with out issue on the UNO. So will go back to the drawing board but you may not like the approach I am going to take but if it works.

  4. #254
    Junior Member
    Join Date
    Jul 2021
    Posts
    5
    Quote Originally Posted by mjs513 View Post
    Hi Brian
    Taking a break from my other distractions and just gave you latest library changes a try with one of those generic mpu-9250 boards and I am having problems. Haven't had a chance to debug yet but this is all I am getting with the Basic_SPI example:
    Code:
    IMU initialization unsuccessful
    Now if I use the last version of the library I was using it works without an issue even at 600Mhz. I am attaching the version I have that works. As time permits will do some debugging.

    @ora_jago you are free to give the version I just attached to see if it works - might help with the debugging.
    hi mjs513 thanks for your sharing....it's work for me....

  5. #255
    Junior Member
    Join Date
    Jul 2021
    Posts
    5
    Quote Originally Posted by brtaylor View Post
    I just updated the library with an increased delayNanoseconds time, should hopefully be a little more robust now.
    thanks for your support brian...

    if I will increase the sampling rate to 4000 hz is it just by editing Register 29 – Accelerometer Configuration 2 into 0x08 and disable the gyrometer or adding new code?

    // enable accelerometer and gyro
    //if(writeRegister(PWR_MGMNT_2,SEN_ENABLE) < 0){
    // return -6;
    //}

    // Disable gyro
    if(writeRegister(PWR_MGMNT_2,DIS_GYRO) < 0){
    return -6;
    }


    Thanks

  6. #256
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,429
    Quote Originally Posted by ora_jago View Post
    hi mjs513 thanks for your sharing....it's work for me....
    Hi @brtaylor
    Strange that its not working for me with my breakouts - what breakouts are you using?

  7. #257
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    702
    Quote Originally Posted by mjs513 View Post
    Hi @brtaylor
    Strange that its not working for me with my breakouts - what breakouts are you using?
    The old emsensor boards modified to work with SPI.

  8. #258
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,429
    Quote Originally Posted by brtaylor View Post
    The old emsensor boards modified to work with SPI.
    Tested that board ("The old emsensor boards modified to work with SPI.") this morning and its working for me with your current lib. But if I use one of the ebay/amazon mpu-9250's thats when I run into problems.

  9. #259
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    702
    Quote Originally Posted by mjs513 View Post
    Tested that board ("The old emsensor boards modified to work with SPI.") this morning and its working for me with your current lib. But if I use one of the ebay/amazon mpu-9250's thats when I run into problems.
    I wonder if it's an issue with counterfeits?

  10. #260
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,429
    Sorry was off doing errands - could be. I did check the markings but can't tell - the ones I have are marked correctly according the spec but I can not say for sure.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •