Hi all,
I'm trying to work with the BMI088 IMU sensor of Bosch in Zephyr (I'm still learning this).
The problem is that I don't see any samples with this sensor. I tried to use the sample for the BMI270 thinking that it would be similar but I don't manage to make it work.
I'm not sure how to adapt it at least to detect the device.
&arduino_i2c { status = "okay"; bmi270@68 { compatible = "bosch,bmi270"; reg = <0x68>; }; };
This is the overlay file, should I change the value of the register? The datasheet of the bmi270 says that 0x68 is the default I2C register. In the case of BMI088 the default I2C value of the accelerometer is 0x19 ( I checked with Arduino I2C scanner and I receive 0x19 for the accelerometer and 0x69 for the gyro).
The next code is part of the main.c included in the BMI270 sample.
#include <zephyr/zephyr.h> #include <zephyr/device.h> #include <zephyr/drivers/sensor.h> #include <stdio.h> void main(void) { const struct device *dev = DEVICE_DT_GET_ONE(bosch_bmi270); struct sensor_value acc[3], gyr[3]; struct sensor_value full_scale, sampling_freq, oversampling; if (!device_is_ready(dev)) { printf("Device %s is not ready\n", dev->name); return; } printf("Device %p name is %s\n", dev, dev->name);
I only included this part because it does.t go further, the message I receive is that the device is not ready.
Any idea of how to adapt this code to my project? Not only for the BMI088, in general, as I have more sensors.
Thank you,
Pablo.