File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ import time
2
+ import board
3
+ from adafruit_extended_bus import ExtendedI2C as I2C
4
+ import adafruit_bno055
5
+
6
+ # Create library object using our Extended Bus I2C port
7
+ i2c = I2C (1 ) # Device is /dev/i2c-1
8
+ sensor = adafruit_bno055 .BNO055_I2C (i2c )
9
+
10
+ while True :
11
+ print ("Temperature: {} degrees C" .format (sensor .temperature ))
12
+ print ("Accelerometer (m/s^2): {}" .format (sensor .acceleration ))
13
+ print ("Magnetometer (microteslas): {}" .format (sensor .magnetic ))
14
+ print ("Gyroscope (rad/sec): {}" .format (sensor .gyro ))
15
+ print ("Euler angle: {}" .format (sensor .euler ))
16
+ print ("Quaternion: {}" .format (sensor .quaternion ))
17
+ print ("Linear acceleration (m/s^2): {}" .format (sensor .linear_acceleration ))
18
+ print ("Gravity (m/s^2): {}" .format (sensor .gravity ))
19
+ print ()
20
+
21
+ time .sleep (1 )
You can’t perform that action at this time.
0 commit comments