This guide explains the accelerometer features and functions. There are no great variations in this library for our new product lines Waspmote v15 and Plug & Sense! v15, released on October 2016.
To start using Waspmote ACC library, an object from class 'WaspACC' must be created. This object, called ACC, is created inside the Waspmote ACC library and it is public to all libraries. It is used through the guide to show how the Waspmote ACC library works.
When creating this constructor, no variables are initialized by default.
There are many registers and constants defined in Waspmote ACC library. These registers and constants are used to define some configuration parameters used in Free-Fall or Inertial Wake-Up events and other tasks in the library. Through this guide, all these values will be explained.
The thresholds used to generate interruptions are values selected according to the tests performed. However, each developer should analyze its scenario and decide if the thresholds have to be modified.
There are various flags used to handle interruptions and errors while using the Waspmote accelerometer.
flagis used to set reading or writing errors or hardware interruptions. Possible values are:
ACC_ERROR_READING: error reading register.
ACC_ERROR_WRITING: error writing register.
It is used to check the port in which the interruption has got activated. It is used in this library, and it will be used in other libraries which generate interrupts too.