Пробовал перепаять контакты, подключить их к кварцу, поставить резисторы на 4.7 кОм, поменять скорость на более высокую, подключить контроллер к ноуту, а не компу, подтягивал AD к GND для смены адреса. Ничего не помогло.
Прозвонил провода - все целые. На SDA и SCL напряжение 3,25 В, на VIN 3,27 В.
Может кто знает, в чём может быть проблема?
j
I2C device found at address 0x3B !
I2C device found at address 0x3F !
I2C device found at address 0x41 !
I2C device found at address 0x43 !
I2C device found at address 0x45 !
I2C device found at address 0x4A !
I2C device found at address 0x4C !
I2C device found at address 0x4E !
I2C device found at address 0x50 !
I2C device found at address 0x55 !
I2C device found at address 0x57 !
I2C device found at address 0x5B !
I2C device found at address 0x5D !
I2C device found at address 0x5F !
I2C device found at address 0x61 !
I2C device found at address 0x68 !
I2C device found at address 0x6A !
I2C device found at address 0x6D !
I2C device found at address 0x6F !
I2C device found at address 0x71 !
I2C device found at address 0x75 !
I2C device found at address 0x78 !
I2C device found at address 0x7B !
I2C device found at address 0x7D !
done
No I2C devices found
Очень странно видеть 24 адреса там, где должен быть один 0x68.
Я загрузил код для вывода данных гироскопа. Arduino ide в ответ пишет Wire.endTransmission() failed.
Код для гироскопа:
#include <BMI160Gen.h>
#include <Wire.h>
const int i2c_addr = 0x68;
const int sda_pin = 21;
const int scl_pin = 22;
void setup() {
Serial.begin(9600);
while (!Serial);
Wire.begin(sda_pin, scl_pin);
if (!BMI160.begin(BMI160GenClass::I2C_MODE, i2c_addr)) {
Serial.println("BMI160 initialization failed!");
while (1);
}
Serial.println("BMI160 initialized successfully in I2C mode!");
}
void loop() {
int gx, gy, gz;
int ax, ay, az;
BMI160.readGyro(gx, gy, gz);
BMI160.readAccelerometer(ax, ay, az);
Serial.print("Gyroscope Data (X, Y, Z): ");
Serial.print(gx);
Serial.print(", ");
Serial.print(gy);
Serial.print(", ");
Serial.println(gz);
Serial.print("Accelerometer Data (X, Y, Z): ");
Serial.print(ax);
Serial.print(", ");
Serial.print(ay);
Serial.print(", ");
Serial.println(az);
delay(500);
}
Подтягивающие резисторы присутствовали. На результат не влияли. В магазине попробовали использовать другой BMI160. Результат тот же - No I2C devices found