Wire1 Hangs Teensy 3.2 + MPU9250 add-on

Status
Not open for further replies.
Hello,

I'm trying to use this device:
https://www.tindie.com/products/onehorse/mpu9250-teensy-3x-add-on-shields/
on a Teensy 3.2. However, once I got it soldered on in the right spot and uploaded a sketch, I couldn't see the 9dof at all. I tried using Wire1 instead of Wire as the page said, but it seems to just hang at Wire1.begin() if I do so.

Code I'm using to test:

Code:
#include "MPU9250.h"

MPU9250 mpu;

void setup()
{
    Serial.begin(115200);

    Wire1.begin();
    Serial.println("I2C Successful");

    delay(2000);
    mpu.setup();

    delay(5000);

    // calibrate anytime you want to
    mpu.calibrateAccelGyro();
    mpu.calibrateMag();

    mpu.printCalibration();
}

void loop()
{
}

I tried using different mpu9250 libraries and all show the same thing; nothing on Wire1.

I do have all pads soldered to the back of the Teensy, but the pin 33 doesn't "seem" to be causing issues.

Does anyone have ideas?
 
Yes, follow up with onehorse. Did you try his github code and suggestions on readme and wiki? Changing to Wire1 takes a code edit IIRC where the posted code uses WIRE for connecting on the normal pathways of other devices.
 
Also, just my curiosity, but where did you download that MPU9250 library from?

Yes, follow up with onehorse. Did you try his github code and suggestions on readme and wiki? Changing to Wire1 takes a code edit IIRC where the posted code uses WIRE for connecting on the normal pathways of other devices.

I haven't found his wiki, I'll do that today. I figured he had some code somewhere to test already set up with this board.

I got the mpu9250 library from the arduino library manager, which one I can't remember (on my home computer, I'm at work right now)
 
@GinDiamond

I don't have this particular OneHorse board but they typically work. Example Sketches and other documentation is linked on his product but page but can be found here: https://github.com/kriswiner/MPU9250.

Interesting. I tried that sketch this morning, and it says that the shield wasn't detected at all (MPU9250 I AM FF I should be 71).

I think I'll try desoldering the shield and seeing if it works on its own.
 
Interesting. I tried that sketch this morning, and it says that the shield wasn't detected at all (MPU9250 I AM FF I should be 71).

I think I'll try desoldering the shield and seeing if it works on its own.
Hang on - before desoldering anything - I ran into that problem before - let me check something.
 
Hang on - before desoldering anything - I ran into that problem before - let me check something.

First check to see if the ADO pin is reading Hi or Low (3.3 or gnd). If it its Hi change:
Code:
#define ADO 0
to
Code:
#define ADO 1
 
First check to see if the ADO pin is reading Hi or Low (3.3 or gnd). If it its Hi change:
Code:
#define ADO 0
to
Code:
#define ADO 1

I tried this, however, I still get the same error.

Code:
// Using the MPU9250Teensy 3.1 Add-On shield, ADO is set to 0 
// Seven-bit device address is 110100 for ADO = 0 and 110101 for ADO = 1
#define ADO 1
#if ADO
#define MPU9250_ADDRESS 0x69  // Device address when ADO = 1
#define AK8963_ADDRESS 0x0C   //  Address of magnetometer
#define MS5637_ADDRESS 0x76   // Address of altimeter
#else
#define MPU9250_ADDRESS 0x68  // Device address when ADO = 0
#define AK8963_ADDRESS 0x0C   //  Address of magnetometer
#define MS5637_ADDRESS 0x76   // Address of altimeter
#endif
 
Unsoldering that would be a bear - and could easily remove those under pads with heat or pressure if pulled.

It has been some time but I've soldered onehorse underpad MPU's like that to at least one T_3.2 and T_3.6 and found them to work using his code - I've gotten a few+ other boards from onehorse to good effect. The tindie page links to Wiki and code and that is what I used.

The soldering is critical on those under pads of course so check that for only intended good clean connects. And pay attention to the proper address as @mjs513 notes - then make sure the proper Wire1 bus is in use in the code to get to those bottom pad pin #'s.

And onehorse is the best source for questions - not sure if you've been in contact with him but I've found him very helpful and responsive … I got on a github stream is seems and my inbox caught 866 messages in the last 8 months with YPR or other questions for working devices.
 
Status
Not open for further replies.
Back
Top