1
- // Basic demo for accelerometer, gyro, and magnetometer readings from the Adafruit
2
- // LSM6DSOX+LIS3MDL Breakout or FeatherWing and the LSM6DSOX+LIS3MDL Breakout
1
+ // Basic demo for accelerometer, gyro, and magnetometer readings
2
+ // from the following Adafruit ST Sensor combo boards:
3
+ // * LSM6DSOX + LIS3MDL FeatherWing : https://www.adafruit.com/product/4565
4
+ // * ISM330DHCX + LIS3MDL FeatherWing https://www.adafruit.com/product/4569
5
+ // * LSM6DSOX + LIS3MDL Breakout : https://www.adafruit.com/product/4517
6
+ // * LSM6DS33 + LIS3MDL Breakout Lhttps://www.adafruit.com/product/4485
3
7
4
8
#include < Adafruit_LSM6DSOX.h>
5
9
Adafruit_LSM6DSOX lsm6ds;
@@ -9,8 +13,12 @@ Adafruit_LSM6DSOX lsm6ds;
9
13
// #include <Adafruit_LSM6DS33.h>
10
14
// Adafruit_LSM6DS33 lsm6ds;
11
15
12
- #include < Adafruit_LIS3MDL.h>
16
+ // To use with the ISM330DHCX+LIS3MDL Feather Wing, uncomment these two lines
17
+ // and comment out the lines referring to the LSM6DSOX above
18
+ // #include <Adafruit_ISM330DHCX.h>
19
+ // Adafruit_ISM330DHCX lsm6ds;
13
20
21
+ #include < Adafruit_LIS3MDL.h>
14
22
Adafruit_LIS3MDL lis3mdl;
15
23
16
24
void setup (void ) {
@@ -114,8 +122,9 @@ void setup(void) {
114
122
case LSM6DS_GYRO_RANGE_2000_DPS:
115
123
Serial.println (" 2000 degrees/s" );
116
124
break ;
117
- default :
118
- break ; // unsupported range for the DSOX
125
+ case ISM330DHCX_GYRO_RANGE_4000_DPS:
126
+ Serial.println (" 4000 degrees/s" );
127
+ break ;
119
128
}
120
129
// lsm6ds.setGyroDataRate(LSM6DS_RATE_12_5_HZ);
121
130
Serial.print (" Gyro data rate set to: " );
0 commit comments