summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordragonprevost <dragon@dkp.io>2018-11-13 11:55:14 -0800
committerdragonprevost <dragon@dkp.io>2018-11-13 11:55:14 -0800
commit94ba7c621dffcc373c2ced094badc96042853525 (patch)
treeb595c7f2f5a8f33b96a76ce7973aa0ef5178506a
parent94ba948f63c8b3b43ed858c601bb3ddf2e59bd35 (diff)
adding settings to readme
-rw-r--r--readme.md20
1 files changed, 16 insertions, 4 deletions
diff --git a/readme.md b/readme.md
index 85bb459..9b96aad 100644
--- a/readme.md
+++ b/readme.md
@@ -3,11 +3,23 @@ MangOH Motion Service
This application is designed to operate on a [MongOH Red](https://mangoh.io/mangoh-red-new) WP85 board. Using **general input output** this project uses pthreads to probe the onboard bmi160 chip intermittently in order to detect a significant motion on the board.
## Prerequisites
-Throw in some prereq
-## Getting Started
+When cloning use ``git clone --recurse-submodule https://github.com/brnkl/motion-service.git``
+to include the util module.
+
+
+## Building
Compile the project using
-``make wp85``
+wp85: ``make wp85``
+
+## Setting Variables
+To change the sensitivity of the application 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);``
+`#define DEFAULT_THRESHOLD_MS2 17` determines the magnitude of the resulting vector that will trigger the application to detect a sudden impact.
+
+If adjusting the value of `DEFAUTL_THRESHOLD_MS2` keep in mind that gravity implies a motionless magnitude of -9.8m/s^2
+
+As visualized with the red vector here.
+![Magnitude](https://www.intmath.com/vectors/img/235-3D-vector.png)
-## Setting