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
37
48#include < Adafruit_LSM6DSOX.h>
59Adafruit_LSM6DSOX lsm6ds;
@@ -9,8 +13,12 @@ Adafruit_LSM6DSOX lsm6ds;
913// #include <Adafruit_LSM6DS33.h>
1014// Adafruit_LSM6DS33 lsm6ds;
1115
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;
1320
21+ #include < Adafruit_LIS3MDL.h>
1422Adafruit_LIS3MDL lis3mdl;
1523
1624void setup (void ) {
@@ -114,8 +122,9 @@ void setup(void) {
114122 case LSM6DS_GYRO_RANGE_2000_DPS:
115123 Serial.println (" 2000 degrees/s" );
116124 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 ;
119128 }
120129 // lsm6ds.setGyroDataRate(LSM6DS_RATE_12_5_HZ);
121130 Serial.print (" Gyro data rate set to: " );
0 commit comments