2021-10-07 09:01 AM
Hi. I want to use HMC5833L for my project but I couldn't find any library to be used as a reference. Can someone briefly explain what are the steps needed to read data from the sensor? I have a little piece of code below but it doesn't work.
HAL_I2C_Mem_Read(&hi2c1, GY271_ADDR, 0x10, 1, &check, 1, 1000);
if (check == 'H') {
sprintf(data, "OK\r\n");
HAL_UART_Transmit(&huart1, (uint8_t *) data, sizeof(data), 100);
memset(data, '\0', sizeof(data));
}
The value that I get for check is 8.
Solved! Go to Solution.
2021-10-27 05:49 AM
Hi @M7890.1 ,
please note that the HMC5883L magnetometer is a product from Honeywell, so I suggest you to ask for help on their support page.
For a C library, I suggest to check this repository on Github.
Or, if you have the GY-271 product, you might refer to this wiki page.
Check also the suggested hardware connections.
-Eleon
2021-10-27 05:49 AM
Hi @M7890.1 ,
please note that the HMC5883L magnetometer is a product from Honeywell, so I suggest you to ask for help on their support page.
For a C library, I suggest to check this repository on Github.
Or, if you have the GY-271 product, you might refer to this wiki page.
Check also the suggested hardware connections.
-Eleon