Upgraded Mag Compass from HMC 5843 to HMC 5883L .
To verify the the 5883L was a good unit, I ran the Compass Library test program comparing the 5843 to the 5883L . Both the 5843 & 5883L reported about the same number (~ 180) for a heading of South.
Next I installed the 5883L and did a Upload with Arduino and complete software setup with planner including eeprom erase. With the 5883L installed, South(180 degrees) now displays as 145 degrees.
In config.h, under // MAGNETOMETER. I found :
# define MAG_PROTOCOL MAG_PROTOCOL_5843 // Default Setting.
I changed that to :
# define MAG_PROTOCOL MAG_PROTOCOL_5883L.
Again did a Arduino software upload and planner setup including eeprom erase. This did not work, compass reports 60 degrees instead of 180.
Last test was to remove all # define MAG_PROTOCOL leaving :
#ifndef MAG_PROTOCOL
#endif
Compass displays 145 degrees instead of 180.
Just reporting the problem.
Max_Crash
Replies
Please try loading the APM code instead and see if that works. If so, we can zero in on your problem.