Combines a working system to save force, acceleration and gyro data to an SD card in a MAX32630 with BLE_Heartrate taken from the mbed site.

Dependencies:   USBMSD_BD BMI160 HX711 max32630fthr USBDevice

Files at this revision

API Documentation at this revision

Comitter:
qaz
Date:
Thu Jun 04 10:32:19 2020 +0000
Parent:
82:f01379c0f435
Commit message:
Publishing

Changed in this revision

source/main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r f01379c0f435 -r b67e4bb6a087 source/main.cpp
--- a/source/main.cpp	Fri Oct 25 10:33:47 2019 +0000
+++ b/source/main.cpp	Thu Jun 04 10:32:19 2020 +0000
@@ -102,7 +102,7 @@
 
 void periodicCallback(void) {
     if ((ble_call) || (blecallcontinuously)) {
-        led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */
+        led1 = /* !led1 */ LED_OFF; /* Do blinky on LED1 while we're waiting for BLE events. It's set to LED_OFF at the moment (24/10/19) because the BLE blinking can get in the way of the lights for writing data, no SD card inserted and calibration and BLE is not yet doing anything useful */
 
         if (BLE::Instance().getGapState().connected) {
             eventQueue.call(updateSensorValue);
@@ -270,7 +270,7 @@
 
     while (true) {
     
-        if(button_pressed>=1) { // double-pressed if for calibration
+        if(button_pressed>=1) { // double-pressed if for calibration (ideally). Set to triple-pressed to reduce sensitivity (see below).
             tick.attach_us(&tick_timer, 1000);
             gLED = LED_ON;
             rLED = LED_OFF;
@@ -358,7 +358,7 @@
                 gLED = LED_OFF;
                 rLED = LED_OFF;
                 wait(1.0); // make plenty of time for second press
-                if (button_pressed > 1) { // If double-click (or more)
+                if (button_pressed > 2) { // If double[triple for desensitivity]-click (or more)
                 // blink blue once and send out a reading on the com port
                     bLED = LED_ON;
                     wait(1.0);