You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When changing the execution core of the task to read IMU (MPU6886) values using xTaskCreatePinnedToCore from 1 to 0, the correct value cannot be read from the IMU.
In the sample code below, if you swap lines 20 and 21, it works or doesn't work properly.
Hi, meltingrabbit
Arduino run loop() in core1, so if use core 1 to run task, it will run normal
If use core0, I can't be sure i2c is working well (now i2c running looks weird)
They use global variables and are hardcoded in a few places. Your best bet is to replace their i2c calls in MPU6886::I2C_Read_NBytes and MPU6886::I2C_Write_NBytes with the platform i2c calls. Note you will also need to replace the Wire1.begin(21,22); in MPU6886.cpp with the correct i2c setup code. In general, unless you are doing a very simple project you will need to replace all of their hardware calls with platform code. Also keep an eye out for random hardcoded values. Lastly check the other projects for MPU6886.h/cpp files. They copy, paste, and modify slightly in all of the projects, so some may or may not have fixes or changes depending on when/if they were updated.
When changing the execution core of the task to read IMU (MPU6886) values using
xTaskCreatePinnedToCore
from 1 to 0, the correct value cannot be read from the IMU.In the sample code below, if you swap lines 20 and 21, it works or doesn't work properly.
The text was updated successfully, but these errors were encountered: