Read BMI160 senor 6DOF 2 click with Teensy 3.6

Status
Not open for further replies.
@Sigi88
Unfortunately the library you reference: "hanyazou (https://github.com/hanyazou/BMI160-Arduino) " is setup for the Arduino Curie. I don't see any option that allow you set which pins without editing the library. You would have to edit the lib to change Wire calls to the Wire1, or Wire2 if you want to use other I2C buses? However it looks like its setup for I2C on Wire which would be pins 18 (SDA) and 19(SCL).

Suggestions make sure your connections are to pins 18 and 19 and make sure your initialization is correct
Code:
  BMI160.begin(BMI160GenClass::I2C_MODE, bmi160_i2c_addr);
where for me the
Code:
bmi160_i2c_addr = 0x69
 
@mjs513 I try it with both channels for the I2c on teensy 3.6 but without success. The attempt with the Arduino Uno was successful.
I always thought that Arduino's codes on the Teensy were apparently not the libraries.

Do you know any code examples for i2c that are compatible with the Teensy?
 
@mjs513 I don't know how but now I get data from the sensor via pin 18 and 19. Now I want to try to connect 2 sensors.
 
Yes, if they have different I2C addresses!
Sometimes you can setup the address via commands, sometimes via jumpers, sometimes not at all.
 
If you look at the I2C schematic on the hanyazou (https://github.com/hanyazou/BMI160-Arduino) you can change from the default address to the BMI160's alt address by connecting SDO/SA0 pin of the BMI160 to 3.3v I believe. But off the top of my head forgot what the alt address is. You would also need to create a separate instance of the second address.
 
@mjs513 and XFer thank you. I use another acceleration senor platform (6DOF IMU 2click). So with a scanner code I get two different Ids (0x68 and 0x69)
With the codes of hanyazou and yours I can only receive the Platform Id 209 / 1D. But it makes no distinction between Ids 0x69 and 0x68. I think I have to expand the libraries to that end.
I would like to use your (mjs513) and the codes of hanyazou.
 
In principle I have to send a request to these divices to receive 0x68 and 0x69 in order to get information from them?
 
@mjs513 how can I create a separate instance of the scond address to get the data from two accelaration devices?
Do I have to change the CurieIMU library for this?
 
Hallo,

I get raw values from BMI160 sensor. How I can convert this values into m/s^2.
Where can I find a number factor to convert the values. I looked in the bmi160 documentation and found only the term LSB. What does this mean?
 
Status
Not open for further replies.
Back
Top