lis2ds12 Bypass to FIFO/Stream example
My test:
I want to set up the FIFO for bypass->stream, and then just move (shouldn't have to be a violent shake) the PCB that has the lis2ds12 on it and see the FIFO have data.
I'm only able to detect violent shaking... could you please advise / suggest more sensitive settings?
Right now it only (KIND OF) works if I leave datarate set to ```c
/* Set XL Output Data Rate */
lis2ds12_xl_data_rate_set(&dev_ctx, LIS2DS12_XL_ODR_50Hz_HR);
```
In this mode, if I VIOLENTLY SHAKE the lis2ds12, I get data in the FIFO.
If I change this to closer to the settings that I already have working on the other ST chip (lis2dtw12), eg `LIS2DS12_XL_ODR_200Hz_LP` - it doesn't work at all.
My set up is based on the github example here:
Edits:
```c
lis2ds12_fifo_mode_set(&dev_ctx, LIS2DS12_BYPASS_TO_STREAM_MODE);
```
And then enabled the wakeup functions to be pretty sensitive (i think):
```c
lis2ds12_wkup_dur_set(&dev_ctx, 0);
lis2ds12_act_sleep_dur_set(&dev_ctx, 0);
lis2ds12_wkup_threshold_set(&dev_ctx, 0x01);
```
And then, assuming this works like the LIS2DTW12, I enabled interrupts for wakeup:
```c
//FIFO Bypass to Continuous Mode MAYBE? (at least on the dtw) requires
/* Enable activity detection interrupt */
lis2ds12_pin_int1_route_get(&dev_ctx, &int_route);
int_route.int1_wu = PROPERTY_ENABLE;
lis2ds12_pin_int1_route_set(&dev_ctx, int_route);
```
I've also tested w/ a 200Hz data rate (in the HR mode), but same result. If I go from HR to LP, even violent shaking doesn't get me any results... in a different (the lis2DTW part) I am using 200hz with threshold of 2, and it works relatively fine - detects movement w/o needing to violently shake.
