MT6701_get_angle_degree using soft i2c

This commit is contained in:
2025-11-18 14:44:04 +08:00
parent 1d75c96f74
commit ffc20fb0a9

15
empty.c
View File

@@ -113,12 +113,15 @@ int main(void) {
uint32_t readback = 0xffff;
while (1) {
I2C_Start();
I2C_SendByte(0x06 << 1);
I2C_RecviveAck();
I2C_SendByte(0x03);
I2C_RecviveAck();
I2C_Stop();
// I2C_Start();
// I2C_SendByte(0x06 << 1);
// I2C_RecviveAck();
// I2C_SendByte(0x03);
// I2C_RecviveAck();
// I2C_Stop();
MT6701_get_angle_degree();
printf("angle is %f \n", angle_f);
// DL_GPIO_writePinsVal(LED_PORT, LED_PA0_PIN, 1);
// readback = DL_GPIO_readPins(LED_PORT, LED_PA0_PIN);