MPU6050 on Teensy

Status
Not open for further replies.

Marvikov

Member
Hey people i need your help. I would like to read three MPU6050 sensors simultaneously. I have now bought a teensy, because this has two I2C busses, not like the arduino. Now I've connected two of the sensors via one bus by changing the address of the one sensor. Now I wonder how I can now control the third sensor via the other bus?

Many thanks in advance.
 
I'm still a bit new in the programming language. So now I have two sensors adressmanipulation connected and it works fine.
What exactly do I have to change now to read the third sensor?
I connected it to SCL1 and SDA1....
 
So, what do I do with the adress of the thirs sensor? Because two of the sensors now have the same adress (0x68) but on a different bus. Is this a problem for the code?
And how can I see my output values on the serial monitor? When I upload the code on my teensy there is no error but I can't see anything on the serial monitor.... What could be the problem for that?
 
No other library needed. Wire1 is part of the normal Wire library.

However, if you're using Teensy LC (can't tell which board you have from the messages above), you'll need to edit WireKinetis.h to enable Wire1 in the code. It's disabled by default on LC to save memory, since LC has only 8K or RAM.

On Teensy 3.2, 3.5 and 3.6, you can just use Wire1. No need to edit anything. Just including Wire.h is enough.
 
Status
Not open for further replies.
Back
Top