This issue can be closed, because it says to minor "rework" of the source code.
I haven’t learned how to do PR yet, so whoever can, please add it to the release.
It is also possible that this addition is only necessary for me, because I am not sure of the authenticity of the lsm6ds3 sensors - which I bought in China.
In general, the problem is the following - when the board is first started with the MCUstm32f401, the sensor shows a lack of data and the message Device error appears in the serial port.
If you press reset, the data appears.
I myself discovered this problem by accident - I usually use about 4-5 sensors connected via the i2c bus.
I got out of the situation by performing a simple software reset of the microcontroller and doing this in a cycle of checking data from the device.
//Call .begin() to configure the IMUs
if (myIMU.begin() != 0) {
Serial.println("Device error");
digitalWrite(STATUS_LED, LOW); // stm32f411 led ON
delay(500);
NVIC_SystemReset();
} else {
Serial.println("Device OK!");
}
For my convenience, I added the LED ignition to see how the code is executed.
I also output raw data to the serial port in this way.
I hope this helps those who encounter the same problem.
P.S. I'm using an Arduino core.
Function software reset NVIC_SystemReset(); available for ST microcontrollers only.
If you use a different tool for compiling the firmware or a different microcontroller, then you need to look for a different reboot tool.
This issue can be closed, because it says to minor "rework" of the source code. I haven’t learned how to do
PR
yet, so whoever can, please add it to the release. It is also possible that this addition is only necessary for me, because I am not sure of the authenticity of the lsm6ds3 sensors - which I bought inChina
.In general, the problem is the following - when the board is first started with the
MCU
stm32f401, the sensor shows a lack of data and the messageDevice error
appears in the serial port. If you press reset, the data appears. I myself discovered this problem by accident - I usually use about 4-5 sensors connected via thei2c
bus. I got out of the situation by performing a simple software reset of the microcontroller and doing this in a cycle of checking data from the device.For my convenience, I added the
LED
ignition to see how the code is executed. I also output raw data to the serial port in this way.Before changing the code, the first start of the device was like this:
After modification:
I hope this helps those who encounter the same problem. P.S. I'm using an Arduino core. Function software reset
NVIC_SystemReset();
available forST
microcontrollers only. If you use a different tool for compiling the firmware or a different microcontroller, then you need to look for a different reboot tool.