Lennard
February 18, 2017, 8:59am
1
I want to use de ONE v2 partly as a stepcounter. Does any one have experience with this?
Who has a library for the LIS3DE / ONE v2? Or knows when it will be available?
I don’t know if this is the official one yet or not, but you can find a reference for the LIS3DE on the SODAQTracker v2 github
https://github.com/SodaqMoja/SodaqOne-UniversalTracker-v2/blob/master/SodaqOneTracker_v2/LIS3DE.h
Please see sample code in this link
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…