diff --git a/examples/values.py b/examples/values.py new file mode 100644 index 0000000..d52b517 --- /dev/null +++ b/examples/values.py @@ -0,0 +1,20 @@ +import time +import board +import busio +import adafruit_bno055 + +i2c = busio.I2C(board.SCL, board.SDA) +sensor = adafruit_bno055.BNO055(i2c) + +while True: + print('Temperature: {} degrees C'.format(sensor.temperature)) + print('Accelerometer (m/s^2): {}'.format(sensor.accelerometer)) + print('Magnetometer (microteslas): {}'.format(sensor.magnetometer)) + print('Gyroscope (deg/sec): {}'.format(sensor.gyroscope)) + print('Euler angle: {}'.format(sensor.euler)) + print('Quaternion: {}'.format(sensor.quaternion)) + print('Linear acceleration (m/s^2): {}'.format(sensor.linear_acceleration)) + print('Gravity (m/s^2): {}'.format(sensor.gravity)) + print() + + time.sleep(1)