@@ -93,8 +93,18 @@ class BNO055:
93
93
temperature = _ReadOnlyUnaryStruct (0x34 , 'B' )
94
94
"""Measures the temperature of the chip in degrees Celsius."""
95
95
accelerometer = _ScaledReadOnlyStruct (0x08 , '<hhh' , 1 / 100 )
96
+ """Gives the raw accelerometer readings, in m/s.
97
+
98
+ .. warning:: This is deprecated. Use `acceleration` instead. It'll work
99
+ with other drivers too."""
100
+ acceleration = _ScaledReadOnlyStruct (0x08 , '<hhh' , 1 / 100 )
96
101
"""Gives the raw accelerometer readings, in m/s."""
97
102
magnetometer = _ScaledReadOnlyStruct (0x0e , '<hhh' , 1 / 16 )
103
+ """Gives the raw magnetometer readings in microteslas.
104
+
105
+ .. warning:: This is deprecated. Use `magnetic` instead. It'll work with
106
+ other drivers too."""
107
+ magnetic = _ScaledReadOnlyStruct (0x0e , '<hhh' , 1 / 16 )
98
108
"""Gives the raw magnetometer readings in microteslas."""
99
109
gyroscope = _ScaledReadOnlyStruct (0x14 , '<hhh' , 1 / 900 )
100
110
"""Gives the raw gyroscope reading in degrees per second."""
@@ -117,6 +127,9 @@ def __init__(self, i2c, address=0x28):
117
127
self ._write_register (_POWER_REGISTER , _POWER_NORMAL )
118
128
self ._write_register (_PAGE_REGISTER , 0x00 )
119
129
self ._write_register (_TRIGGER_REGISTER , 0x00 )
130
+ time .sleep (0.01 )
131
+ self .mode = NDOF_MODE
132
+ time .sleep (0.01 )
120
133
121
134
def _write_register (self , register , value ):
122
135
self .buffer [0 ] = register
0 commit comments