@@ -93,8 +93,18 @@ class BNO055:
9393 temperature = _ReadOnlyUnaryStruct (0x34 , 'B' )
9494 """Measures the temperature of the chip in degrees Celsius."""
9595 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 )
96101 """Gives the raw accelerometer readings, in m/s."""
97102 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 )
98108 """Gives the raw magnetometer readings in microteslas."""
99109 gyroscope = _ScaledReadOnlyStruct (0x14 , '<hhh' , 1 / 900 )
100110 """Gives the raw gyroscope reading in degrees per second."""
@@ -117,6 +127,9 @@ def __init__(self, i2c, address=0x28):
117127 self ._write_register (_POWER_REGISTER , _POWER_NORMAL )
118128 self ._write_register (_PAGE_REGISTER , 0x00 )
119129 self ._write_register (_TRIGGER_REGISTER , 0x00 )
130+ time .sleep (0.01 )
131+ self .mode = NDOF_MODE
132+ time .sleep (0.01 )
120133
121134 def _write_register (self , register , value ):
122135 self .buffer [0 ] = register
0 commit comments