文件名称:esp32-micropython的BMI160陀螺仪驱动
文件大小:13KB
文件格式:ZIP
更新时间:2022-09-15 19:37:30
BMI160
用于esp32的micropython BMI160六轴陀螺仪驱动。用法如下 from machine import Pin, I2C, PWM from BMI160 import BMI160_I2C from time import sleep_ms i2c = I2C(sda=Pin(32), scl=Pin(33)) bmi160 = BMI160_I2C(i2c) k_angle = 180 angle_x = 0 angle_y = 0 angle_garget = 0 while True: data = bmi160.getMotion6() angle_x = data[3] / 32768 * k_angle print(angle_x) sleep_ms(1000 // 25)
【文件预览】:
BMI160
----definitions.py(1KB)
----commands.py(231B)
----registers.py(2KB)
----__init__.py(79KB)