[SOLVED] Firmware not support Magnetometer on 9-axis MPU9250
-
lxrocks
- Member
- Posts: 31
- Joined: Sat Feb 15, 2014 1:24 am
[SOLVED] Firmware not support Magnetometer on 9-axis MPU9250
The latest Crazyflie firmware appears to use Honeywell HMC5883L driver hmc5883l.c to get the Magnetometer x,y,z data. The MPU9250 contains an AK8963 chip not a HMC5893L chip. I thought perhaps the register addressing and control are the same but they are not. For example hmc5883l uses address 05h & 06h for Z-axis MSB/LSB values which on the AK8963 chip addresses the Y-axis. Some of the other register addressing don't match , so clearly the magnetometer code in the firmware does not work.
Last edited by lxrocks on Tue Jan 13, 2015 8:10 pm, edited 1 time in total.
-
tobias
- Bitcraze
- Posts: 2339
- Joined: Mon Jan 28, 2013 7:17 pm
- Location: Sweden
Re: Firmware does not support Magnetometer on 9-axis MPU9250
I don't think you are looking on the right branch? As the Crazyflie 1 and 2 firmwares aren't compatible yet the Crazyflie 2 firmware is in the crazyflie2 branch. Here you can find the AK8963 driver.
-
lxrocks
- Member
- Posts: 31
- Joined: Sat Feb 15, 2014 1:24 am
Re: Firmware does not support Magnetometer on 9-axis MPU9250
Thanks Tobias,
It makes sense now. I cloned what I thought was the CF2 firmware but my Git skills are lacking and did not add -b crazyflie2 to the clone command
eg
Thanks
It makes sense now. I cloned what I thought was the CF2 firmware but my Git skills are lacking and did not add -b crazyflie2 to the clone command
eg
Code: Select all
git clone -b crazyflie2 https://github.com/bitcraze/crazyflie-firmware.git-
Torsten
- Beginner
- Posts: 4
- Joined: Wed Jan 07, 2015 10:31 pm
Re: [SOLVED] Firmware not support Magnetometer on 9-axis MPU
just for completeness:
Once cloned, you can switch between branches back and forth with:
and
A simple
will bring your clone to the newest state.
Once cloned, you can switch between branches back and forth with:
Code: Select all
git checkout crazyflie2
Code: Select all
git checkout master
Code: Select all
git pull
-
lxrocks
- Member
- Posts: 31
- Joined: Sat Feb 15, 2014 1:24 am
Re: [SOLVED] Firmware not support Magnetometer on 9-axis MPU
Until recently the only Git command I have run was clone. So you have probably quadrupled my Git skills now 
Info is much appreciated.
thanks
Info is much appreciated.
thanks