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 1
1
// Tested with X-NUCLEO-IKS01A3
2
- #include < LSM6DSV16XSensor .h>
2
+ #include < LSM6DSV16BXSensor .h>
3
3
4
4
#define INT_1 A5
5
5
6
6
// 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);
8
8
9
9
// Interrupts.
10
10
volatile int mems_event = 0 ;
@@ -27,19 +27,19 @@ void setup()
27
27
attachInterrupt (INT_1, INT1Event_cb, RISING);
28
28
29
29
// Initlialize components.
30
- LSM6DSV16X .begin ();
31
- LSM6DSV16X .Enable_X ();
30
+ LSM6DSV16BX .begin ();
31
+ LSM6DSV16BX .Enable_X ();
32
32
33
33
// Enable Wake Up Detection.
34
- LSM6DSV16X .Enable_Wake_Up_Detection (LSM6DSV16X_INT1_PIN );
34
+ LSM6DSV16BX .Enable_Wake_Up_Detection (LSM6DSV16BX_INT1_PIN );
35
35
}
36
36
37
37
void loop ()
38
38
{
39
39
if (mems_event) {
40
40
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);
43
43
if (status.WakeUpStatus ) {
44
44
// Led blinking.
45
45
digitalWrite (LED_BUILTIN, HIGH);
You can’t perform that action at this time.
0 commit comments