Debugging records of Kendryte K210 gyroscope R6082V

Gyroscope R6082V is actually not difficult, the algorithm is already done, and you only need to read the data. But there are some minor problems in the middle, so please record.

The first is the configuration aspect. There is a pin worth paying attention to in the hardware configuration, which is the pin of the configuration mode (pin 1)

This should be considered a low-level mistake, blame myself. At the beginning, I set the high level directly, but I couldn't catch the data at all. Note that this means that the ground is in uart mode, and the pull-up is in i2c mode.

Because the chip will confirm the level of this pin when it is first powered on, if you use K210 to directly give high and low levels, because there is a delay when giving high and low levels, so you can’t configure it like this. .

And this module does not have a pull-up resistor on it, so if you want to use the i2c mode, you must pull up this pin. It is best to use the uart mode to ground. Although it is also OK in the floating state, it is better to connect it. .

As you can see from the manual, there are a lot of data that can be collected in i2c mode, so i2c mode is preferred, then the code is as follows:

Guess you like

Origin blog.csdn.net/smile_5me/article/details/107758272