How to interface with HMC5883L?
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.
