Revision a97e0fe1
Adafruit_BNO055.cpp | ||
---|---|---|
107 | 107 |
write8(BNO055_AXIS_MAP_SIGN_ADDR, REMAP_SIGN_P2); // P0-P7, Default is P1 |
108 | 108 |
delay(10); |
109 | 109 |
*/ |
110 |
|
|
110 |
|
|
111 | 111 |
write8(BNO055_SYS_TRIGGER_ADDR, 0x0); |
112 | 112 |
delay(10); |
113 | 113 |
/* Set the requested operating mode (see section 3.3) */ |
... | ... | |
131 | 131 |
|
132 | 132 |
/**************************************************************************/ |
133 | 133 |
/*! |
134 |
@brief Changes the chip's axis remap |
|
135 |
*/ |
|
136 |
/**************************************************************************/ |
|
137 |
void Adafruit_BNO055::setAxisRemap( adafruit_bno055_axis_remap_config_t remapcode ) |
|
138 |
{ |
|
139 |
adafruit_bno055_opmode_t modeback = _mode; |
|
140 |
|
|
141 |
setMode(OPERATION_MODE_CONFIG); |
|
142 |
delay(25); |
|
143 |
write8(BNO055_AXIS_MAP_CONFIG_ADDR, remapcode); |
|
144 |
delay(10); |
|
145 |
/* Set the requested operating mode (see section 3.3) */ |
|
146 |
setMode(modeback); |
|
147 |
delay(20); |
|
148 |
} |
|
149 |
|
|
150 |
/**************************************************************************/ |
|
151 |
/*! |
|
152 |
@brief Changes the chip's axis signs |
|
153 |
*/ |
|
154 |
/**************************************************************************/ |
|
155 |
void Adafruit_BNO055::setAxisSign( adafruit_bno055_axis_remap_sign_t remapsign ) |
|
156 |
{ |
|
157 |
adafruit_bno055_opmode_t modeback = _mode; |
|
158 |
|
|
159 |
setMode(OPERATION_MODE_CONFIG); |
|
160 |
delay(25); |
|
161 |
write8(BNO055_AXIS_MAP_SIGN_ADDR, remapsign); |
|
162 |
delay(10); |
|
163 |
/* Set the requested operating mode (see section 3.3) */ |
|
164 |
setMode(modeback); |
|
165 |
delay(20); |
|
166 |
} |
|
167 |
|
|
168 |
|
|
169 |
/**************************************************************************/ |
|
170 |
/*! |
|
134 | 171 |
@brief Use the external 32.768KHz crystal |
135 | 172 |
*/ |
136 | 173 |
/**************************************************************************/ |
Adafruit_BNO055.h | ||
---|---|---|
1 |
/*************************************************************************** |
|
1 |
z/***************************************************************************
|
|
2 | 2 |
This is a library for the BNO055 orientation sensor |
3 | 3 |
|
4 | 4 |
Designed specifically to work with the Adafruit BNO055 Breakout. |
... | ... | |
287 | 287 |
#endif |
288 | 288 |
bool begin ( adafruit_bno055_opmode_t mode = OPERATION_MODE_NDOF ); |
289 | 289 |
void setMode ( adafruit_bno055_opmode_t mode ); |
290 |
void setAxisRemap ( adafruit_bno055_axis_remap_config_t remapcode ); |
|
291 |
void setAxisSign ( adafruit_bno055_axis_remap_sign_t remapsign ); |
|
290 | 292 |
void getRevInfo ( adafruit_bno055_rev_info_t* ); |
291 | 293 |
void displayRevInfo ( void ); |
292 | 294 |
void setExtCrystalUse ( boolean usextal ); |
Also available in: Unified diff