Thingsee Support

How to get the most out of the 2 accelerometer sensors

Thingsee One has 2 accelerometer sensors, one is ultra low-power high performance interrupted based sensor and the other is a iNemo 9-Axis Inertial Module sensor. They are respectively LIS2DH and LSM9DS1.  

Currently, through Thingsee Creator one can only activate the interrupted based accelerometer sensor. Interrupt based means that when a set condition becomes true, then the sensor starts measuring accelerations within its own capabilities, in this particular case, output data rates from 1 Hz to 5.3 kHz, otherwise goes to sleep mode.

Here's a snippet of a purpose with this accelerometer sensor active:

             "causes": [
                {
                  "sId": "0x00050100",
                  "threshold": {
                    "count": 1
                  },
                  "measurement": {
                    "log": false
                  },
                  "thresholds": {
                    "isGt": 0.4
                  }
                },
                {
                  "sId": "0x00050200",
                  "threshold": {
                    "count": 1
                  },
                  "measurement": {
                    "log": false
                  },
                  "thresholds": {
                    "isLt": -0.7
                  }
                },
                {
                  "sId": "0x00050300",
                  "threshold": {
                    "count": 1
                  },
                  "measurement": {
                    "log": true
                  },
                  "thresholds": {
                    "isAny": true
                  }
                }
              ]

 

This sensor is really ultra low-power sensor. So, if you're looking into saving energy, we strongly recommend you to keep using it. As an example of a use case, you can even use it as a wake up trigger to get your device measuring only what you want, whenever you want it, without consuming extra battery to measure unwanted data.

However, if you need to measure acceleration with a specific interval rate, then we advise you to use our other sensor: iNemo 9-Axis Inertial Module sensor.

Even though it's not possible to create a purpose in Thingsee Creator with the accelerometer sensor from iNemo 9-Axis Inertial Module, it is possible to activate it with the following snippet of code:

             "causes": [
                {
                  "sId": "0x00050101",
                  "threshold": {
                    "count": 1
                  },
                 "measurement": {
                    "log": true,
                    "interval": 1000
                  },
                  "thresholds": {
                    "isAny": true
                  }
                },
                {
                  "sId": "0x00050201",
                  "threshold": {
                    "count": 1
                  },
                  "measurement": {
                    "log": true,
                    "interval": 1000
                  },
                  "thresholds": {
                    "isAny": true
                  }
                },
                {
                  "sId": "0x00050301",
                  "threshold": {
                    "count": 1
                  },
                  "measurement": {
                    "log": true,
                    "interval": 1000
                  },
                  "thresholds": {
                    "isAny": true
                  }
                }
              ] 

In sum, you just need to replace the last zero (0) from "sId" with an one (1), and add the polling interval line of code with your required frequency. Everything else is the same and therefore, you can create the purpose logic in Thingsee Creator and later edit it to use the second accelerometer sensor with a code editor program (e.g Notepad++ or Wordpad).

Notice that the units are in micro seconds thus, 1000 here means that the polling frequency is one time per second. Respectively, 10000 means that the sensor would read the acceleration once in every 10 seconds.

Attached you can find the purpose that uses the 3D accelerometer as an example. Please remember that you will not be able to import this to Thingsee Creator since is not compatible.

 

Have more questions? Submit a request

Comments