From ffc20fb0a934904ddc5b5161d8e15b03d52b9919 Mon Sep 17 00:00:00 2001 From: 4x-tech Date: Tue, 18 Nov 2025 14:44:04 +0800 Subject: [PATCH] MT6701_get_angle_degree using soft i2c --- empty.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/empty.c b/empty.c index 8bc5ec9..f829240 100644 --- a/empty.c +++ b/empty.c @@ -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);