Why is the HMC8853L Compass not working STM32F446RE

Thread Starter

specs365

Joined Mar 14, 2019
45
Hi, I want to use the HMC8853L compass that is on a GY 271 breakout board with my STM32F446RE, to get an orientation. This will later be used in an autonomous Kayak project. The code and everything is attached below, I can't seem to read any usable values from the X, Y and Z registers. I Have also attached a datasheet, maybe I am just missing something. The registers always have the same values in them and don't change when I change the compass orientation. I would appreciate any help. Please find the code and datasheet attached below. The name is "LCD_test", but the code is for the compass.
 

Attachments

Thread Starter

specs365

Joined Mar 14, 2019
45
I see now one mistake is that in the read functions I put the Write address, bit still after that, I am not sure how to get an actual bearing.
 
Top