File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
examples/LSM6DSV16BX_Wake_Up_Detection Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 11// Tested with X-NUCLEO-IKS01A3
2- #include < LSM6DSV16XSensor .h>
2+ #include < LSM6DSV16BXSensor .h>
33
44#define INT_1 A5
55
66// I2C_ADD_L for compatibility with X-NUCLEO-IKS01A3
7- LSM6DSV16XSensor LSM6DSV16X (&Wire, LSM6DSV16BX_I2C_ADD_L);
7+ LSM6DSV16BXSensor LSM6DSV16BX (&Wire, LSM6DSV16BX_I2C_ADD_L);
88
99// Interrupts.
1010volatile int mems_event = 0 ;
@@ -27,19 +27,19 @@ void setup()
2727 attachInterrupt (INT_1, INT1Event_cb, RISING);
2828
2929 // Initlialize components.
30- LSM6DSV16X .begin ();
31- LSM6DSV16X .Enable_X ();
30+ LSM6DSV16BX .begin ();
31+ LSM6DSV16BX .Enable_X ();
3232
3333 // Enable Wake Up Detection.
34- LSM6DSV16X .Enable_Wake_Up_Detection (LSM6DSV16X_INT1_PIN );
34+ LSM6DSV16BX .Enable_Wake_Up_Detection (LSM6DSV16BX_INT1_PIN );
3535}
3636
3737void loop ()
3838{
3939 if (mems_event) {
4040 mems_event = 0 ;
41- LSM6DSV16X_Event_Status_t status;
42- LSM6DSV16X .Get_X_Event_Status (&status);
41+ LSM6DSV16BX_Event_Status_t status;
42+ LSM6DSV16BX .Get_X_Event_Status (&status);
4343 if (status.WakeUpStatus ) {
4444 // Led blinking.
4545 digitalWrite (LED_BUILTIN, HIGH);
You can’t perform that action at this time.
0 commit comments