我希望在树莓派3 b +中将VL53L0X
与android Things一起使用
private static final String I2C_DEVICE_NAME = "I2C1";
private static final int I2C_ADDRESS = 0x52;
PeripheralManager manager = PeripheralManager.getInstance();
List<String> deviceList = manager.getI2cBusList();
if (deviceList.isEmpty()) {
Log.i(TAG, "No I2C bus available on this device.");
} else {
Log.i(TAG, "List of available devices: " + deviceList);
}
byte b=0;
//i2c연결
try {
mDevice = manager.openI2cDevice(I2C_DEVICE_NAME, I2C_ADDRESS);
String name= mDevice.getName();
Log.w(TAG, "connected"+name);
此代码将i2c
连接的Android事物VL53L0X
连接起来
但是我听不懂读取的距离数据