imu_read.py

# Este trabalho está licenciado sob a licença MIT.
# Copyright (c) 2013-2023 OpenMV LLC. Todos os direitos reservados.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
from machine import I2C
import time

i2c = I2C(2)
imu = BNO055(i2c)
while True:
    # temperature = imu.temperature()
    # print('temperatura: ℃',temperature)
    yaw, roll, pitch = imu.euler()
    print("yaw, roll, pitch: °", yaw, roll, pitch)
    # w, x, y, z = imu.quaternion()
    # print('Quaternion:', w, x, y, z)
    # x, y, z = imu.accelerometer()
    # print('Acelerômetro (m/s^2):', x, y, z)
    # x, y, z = imu.magnetometer()
    # print('Magnetômetro (microteslas):', x, y, z)
    # x, y, z = imu.gyroscope()
    # print('Giroscópio (graus/seg):', x, y, z)
    # x, y, z = imu.linear_acceleration()
    # print('Aceleração linear (m/s^2)', x, y, z)
    # x, y, z = imu.gravity()
    # print('Gravidade (m/s^2):', x, y, z)
    time.sleep_ms(100)

results matching ""

    No results matching ""