summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Van Doorn <vandoorn.nick@gmail.com>2018-11-24 14:58:19 -0800
committerNick Van Doorn <vandoorn.nick@gmail.com>2018-11-24 14:58:19 -0800
commitdb785f4f3e56336e8d6a12e211433dd7ba410505 (patch)
treeb5db908dfb96e61cd13bef45ad6929083a69a8dd
parent99dea359907f37c1030e5abb6d3df3ef6af4ab79 (diff)
Example thread flag in readme
-rw-r--r--readme.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/readme.md b/readme.md
index fdd3703..a1913aa 100644
--- a/readme.md
+++ b/readme.md
@@ -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.