diff options
author | Nicholas Van Doorn <vandoorn.nick@gmail.com> | 2019-01-14 15:25:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-14 15:25:46 -0800 |
commit | 0f9b54f74e2ac3042e00c84fa08aea392f923e0f (patch) | |
tree | b5db908dfb96e61cd13bef45ad6929083a69a8dd /readme.md | |
parent | 3cf8270f0547789c2aa298531492d6d85fb9c3b1 (diff) | |
parent | db785f4f3e56336e8d6a12e211433dd7ba410505 (diff) |
Merge pull request #10 from brnkl/use-interrupt-pin
Support threaded & pin based motion detection
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -6,12 +6,15 @@ This application is designed to operate on a [MongOH Red](https://mangoh.io/mang When cloning use ``git clone https://github.com/brnkl/motion-service.git``. - ## Building Compile the project using wp85: ``make wp85`` +### Flags + +- `-DMOTION_MONITOR_USE_THREAD` enables thread based mode (polling). By default, an interrupt pin is used to detect motion. This results in lower traffic on the bus (i2c or SPI), but also requires special drivers for the BMI160. + ## Setting Variables To change the sensitivity of impact detection you must edit the `motionMonitor/motionMonitor.c` file. The Accelerometer measures acceleration in 3 dimensions, X, Y, and Z. These dimensions of acceleration are recorded and the magnitude of their resulting vector is calculated using ``double impactMagnitude = sqrt(x * x + y * y + z * z);``. As visualized in the image below. |