Complete guidance on ICM20948 along with attitude estimation using Euler angles and quaternions can be found in my course: www.steppeschool.com/courses/stm32-hal-orientation-estimation The source code is available on Patreon page: www.patreon.com/user?u=80399744
Sorry for the late reply. We just read 6 bytes for magnetometer data (2 bytes x 3 axes) and 2 additional bytes, so the magnetometer will update the readings. We just do serial read starting from MAG_DATA_ONSET. For full info, you can refer to my course: www.steppeschool.com/courses/stm32-hal-orientation-estimation
Please Please make a video to get quaternions that are accurate. I am using different libraries from 2 weeks with i2c with stm and arduino ide but no luck, the quat i get jump positive to negative. Help me cause there seems to be no help from git hub also.
Hello, If you check my website, there is a course about the attitude estimation, where I explained how to compute quaternions. However, it still needs to be completed. Right now, I am working on finishing and updating the course content. If you need news regarding that, you can join my community page on Patreon and the website.
@@steppeschool3629 No problem!I followed along your video series and i writ library using i2c.Unfortunately the magnetometer does not work,here is the snippet of the code : void Mag_WriteReg(uint8_t reg,uint8_t data) { ICM_SelBank(3); ICM_WriteReg(B3_I2C_SLV0_ADDR,(MAG_SLAVE_ADDR)); ICM_WriteReg(B3_I2C_SLV0_REG,reg); ICM_WriteReg(B3_I2C_SLV0_DO,data); HAL_Delay(10); ICM_WriteReg(B3_I2C_SLV0_CTRL,0x81); HAL_Delay(10); } void Mag_ReadReg(uint8_t reg,uint8_t len) { ICM_SelBank(3); ICM_WriteReg(B3_I2C_SLV0_ADDR,(MAG_SLAVE_ADDR) | 0x80); ICM_WriteReg(B3_I2C_SLV0_REG,reg); uint8_t slave_reg; ICM_ReadReg(B3_I2C_SLV0_REG,&slave_reg); ICM_WriteReg(B3_I2C_SLV0_CTRL,0x80 | len); }the registers are written corectly,and I do not know how could i debug the internal i2c master.Would you give me some guidance?
Complete guidance on ICM20948 along with attitude estimation using Euler angles and quaternions can be found in my course:
www.steppeschool.com/courses/stm32-hal-orientation-estimation
The source code is available on Patreon page:
www.patreon.com/user?u=80399744
Great videos. I hope there is a next step in this series that shows how to use DMP functions to offload calculation of sensor roll, pitch, yaw,
Thanks a lot. Hope to release new videos soon.
Amazing content! This channel is a gem 🎉
Thanks👍
Great Job, thank you for sharing
Thank you very much for your guidance. My problem is the delay. There is no delay for the operation of bank3, so I have been stuck reading data.
11:17 can you explain more about reg MAG_DATA_ONSET? why read 8 byte in that? many thanks!
Sorry for the late reply. We just read 6 bytes for magnetometer data (2 bytes x 3 axes) and 2 additional bytes, so the magnetometer will update the readings. We just do serial read starting from MAG_DATA_ONSET. For full info, you can refer to my course:
www.steppeschool.com/courses/stm32-hal-orientation-estimation
@@steppeschool3629 is the address of MAG_DATA_ONSET same the MAG_ST1 (10h)?
Please add a description how to make magnetometer (I2C_SLV0) be synchronized with accelerometer and gyroscope and write data into FIFO.
is it the best sensor for drones?
I do not think so, there should be other IMU sensors with better characteristics
Please Please make a video to get quaternions that are accurate. I am using different libraries from 2 weeks with i2c with stm and arduino ide but no luck, the quat i get jump positive to negative. Help me cause there seems to be no help from git hub also.
Hello, If you check my website, there is a course about the attitude estimation, where I explained how to compute quaternions. However, it still needs to be completed. Right now, I am working on finishing and updating the course content. If you need news regarding that, you can join my community page on Patreon and the website.
at timestamp 12:02 why did you reverse the operands order for the magnetometer(like data_rx[15]
Hi, sorry for the late reply. In the magnetometer, the bytes are in reverse order. That is why I have to read in this way
@@steppeschool3629 No problem!I followed along your video series and i writ library using i2c.Unfortunately the magnetometer does not work,here is the snippet of the code : void Mag_WriteReg(uint8_t reg,uint8_t data)
{
ICM_SelBank(3);
ICM_WriteReg(B3_I2C_SLV0_ADDR,(MAG_SLAVE_ADDR));
ICM_WriteReg(B3_I2C_SLV0_REG,reg);
ICM_WriteReg(B3_I2C_SLV0_DO,data);
HAL_Delay(10);
ICM_WriteReg(B3_I2C_SLV0_CTRL,0x81);
HAL_Delay(10);
}
void Mag_ReadReg(uint8_t reg,uint8_t len)
{
ICM_SelBank(3);
ICM_WriteReg(B3_I2C_SLV0_ADDR,(MAG_SLAVE_ADDR) | 0x80);
ICM_WriteReg(B3_I2C_SLV0_REG,reg);
uint8_t slave_reg;
ICM_ReadReg(B3_I2C_SLV0_REG,&slave_reg);
ICM_WriteReg(B3_I2C_SLV0_CTRL,0x80 | len);
}the registers are written corectly,and I do not know how could i debug the internal i2c master.Would you give me some guidance?
Hi, what is the measuring unit the parameter of HAL_Delay() function?
milliseconds