Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 12 of 12

Thread: interfacing of Teensy 4.0 with mpu9250

  1. #1
    Junior Member
    Join Date
    Jul 2020
    Posts
    5

    interfacing of Teensy 4.0 with mpu9250

    hello, i am trying to interfacing the mpu9250 with Teensy 4.0 , i am using library for mpu9250 the following https://github.com/bolderflight/MPU9250 but i am getting error status -1 unsuccessfull, please anyone here to guide me about it , its not working for both I2C and SPI ,

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,486
    I have not done anything with these, but looking up at their library and current issues and Pull Requests.
    I see that @mjs513 has a Pull Request for the Teensy 4 which has not been merged in.

    You might take a look at: https://github.com/bolderflight/MPU9250/pull/64

  3. #3
    Junior Member
    Join Date
    Jul 2020
    Posts
    5
    i tried these changes already , but still getting same error

  4. #4
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    568
    Can you post pictures of your wiring for SPI and I2C?

  5. #5
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,486
    As in most cases, hard to help much without additional information. Things like maybe a picture showing how you have it wired up.
    Which sketch? Directly one of the examples? Or if edited, maybe include your actual code you are trying.

    Maybe details like, which mpu9250 (like link to product maybe)...

  6. #6
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,558
    I have used the bolderflight library with a couple different MPU9250 breakout boards without issue. Typically when you get that error its the wiring. As @brtaylor and @KurtE mentioned can not help much with a picture of the wiring connections or which example sketch you are using.

    Also, for I2C you could run the "Scanner" example in the Wire library as a double check if you have your I2C wiring correct.

  7. #7
    Junior Member
    Join Date
    Jul 2020
    Posts
    5
    Quote Originally Posted by KurtE View Post
    As in most cases, hard to help much without additional information. Things like maybe a picture showing how you have it wired up.
    Which sketch? Directly one of the examples? Or if edited, maybe include your actual code you are trying.

    Maybe details like, which mpu9250 (like link to product maybe)...
    i have attached the wiring diagram here , connection detailed is here, Vcc of the sensor is connected with 3.3v of teensy 4.SCL with pin 19, and SDA of sensor with pin18 of teensy,ADO and FSYNC are grounded, other pinare not used,these are I2C connection , i am using basic I2C example for this interface.

  8. #8
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,558
    Quote Originally Posted by raza View Post
    i have attached the wiring diagram here , connection detailed is here, Vcc of the sensor is connected with 3.3v of teensy 4.SCL with pin 19, and SDA of sensor with pin18 of teensy,ADO and FSYNC are grounded, other pinare not used,these are I2C connection , i am using basic I2C example for this interface.
    No links that I can see. You might also have to hook up VDDIO to 3.3v. This may depend on your breakout board some have it shorted already to VDD (3.3v).

  9. #9

  10. #10
    Junior Member
    Join Date
    Jul 2020
    Posts
    5
    actually i have no VDDIO PIN on sensor, i am using this sensor
    https://mcustore.ru/store/datchiki-i...xoCK1QQAvD_BwE

  11. #11
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,486
    Not sure if that file... Is exported that people can see. when you say diagram, sometimes that is not

    Also often times it helps to see REAL picture of your setup. Sometimes it shows things like: someone using a breadboard and not soldering the pins to the teensy and hoping that would works (most of the time not)... Or maybe a ground pin missing, or maybe soldering issue, either cold joint or short. Or SCL/SDA pins reversed.

    And again which code... As @mjs513 suggested if you are doing I2C, than try running the Wire Scanner example program to see if it at least sees it.

  12. #12
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,558
    Quote Originally Posted by raza View Post
    On google drive you have to set up the file or directory to allow sharing.

    As @KurtE suggests a picture is worth a thousand words. Since there is no VDDIO then its is probably already shorted to VDD. So not an issue.

Tags for this Thread

Posting Permissions

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