MT6701_get_angle_degree using soft i2c
This commit is contained in:
15
empty.c
15
empty.c
@@ -113,12 +113,15 @@ int main(void) {
|
|||||||
uint32_t readback = 0xffff;
|
uint32_t readback = 0xffff;
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
||||||
I2C_Start();
|
// I2C_Start();
|
||||||
I2C_SendByte(0x06 << 1);
|
// I2C_SendByte(0x06 << 1);
|
||||||
I2C_RecviveAck();
|
// I2C_RecviveAck();
|
||||||
I2C_SendByte(0x03);
|
// I2C_SendByte(0x03);
|
||||||
I2C_RecviveAck();
|
// I2C_RecviveAck();
|
||||||
I2C_Stop();
|
// I2C_Stop();
|
||||||
|
|
||||||
|
MT6701_get_angle_degree();
|
||||||
|
printf("angle is %f \n", angle_f);
|
||||||
|
|
||||||
// DL_GPIO_writePinsVal(LED_PORT, LED_PA0_PIN, 1);
|
// DL_GPIO_writePinsVal(LED_PORT, LED_PA0_PIN, 1);
|
||||||
// readback = DL_GPIO_readPins(LED_PORT, LED_PA0_PIN);
|
// readback = DL_GPIO_readPins(LED_PORT, LED_PA0_PIN);
|
||||||
|
|||||||
Reference in New Issue
Block a user