Hello all,
I am trying to make use of LIS3DE accelerometer on my Sodaq ONE v2, I have found the library here , however I cannot make it interrupt to wake up the sodaq.
I am using the following configuration for the interruption
accelerometer.enable(true, LIS3DE::NormalLowPower10Hz, LIS3DE::XYZ, LIS3DE::Scale4g, true);
sodaq_wdt_safe_delay(100);
accelerometer.enableInterrupt1(
LIS3DE::XHigh | LIS3DE::XLow | LIS3DE::YHigh | LIS3DE::YLow | LIS3DE::ZHigh | LIS3DE::ZLow,
gPercentage * 8.0 / 100.0,accDuration,LIS3DE::MovementRecognition);
}
Would this be enough in order to make the accelerometer interrupt if I move the device up and down with my hand?
Thanks in advance
Kind regards,
Jan
February 10, 2017, 9:54am
#2
Can you update the board files to 1.6.12?
New boards url: http://downloads.sodaq.net/package_sodaq_samd_index.json
Here we made a fix for the accelerometer pins.
Regards,
Jan
@Jan ,
I have set the boards url as you mentioned me, however I still lack of example of how to using the LIS3DE module, are SODAQ working on it?
Thanks in advance,
Please see a sample code in the link below
I wrote the code below using the SodaqOne-UniversalTracker-v2 as baseline. Although it has the code for managing interrupts, It is not activated.
Please improve the code and share. // Code for LIS3DE accelerometer inside SODAQ v2
#include <Arduino.h>
#include <Wire.h>
#include "Sodaq_RN2483.h"
#include "Sodaq_wdt.h"
#include "LIS3DE.h"
#include "RTCTimer.h"
#include "RTCZero.h"
#define debugSerial SerialUSB
#define loraSerial Serial1
#define MAX_RTC_EPOCH_OFFSET 25
RTCZero rtc;
RTCTimer ti…
1 Like