This is a repository for code relating to mbed Fitness Tracker

Dependencies:   mbed PulseSensor2 SCP1000 mbed-rtos 4DGL-uLCD-SE LSM9DS1_Library_cal PinDetect FatFileSystemCpp GP-20U7

Files at this revision

API Documentation at this revision

Comitter:
memig3
Date:
Sat Mar 28 15:13:33 2020 +0000
Parent:
11:94fb690c9a5f
Child:
13:c4c30e3054ac
Commit message:
gps library;

Changed in this revision

GP-20U7.lib Show annotated file Show diff for this revision Revisions of this file
gps_sensor.cpp Show annotated file Show diff for this revision Revisions of this file
pulse_sensor.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GP-20U7.lib	Sat Mar 28 15:13:33 2020 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/wschon/code/GP-20U7/#6d168e2dfb80
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gps_sensor.cpp	Sat Mar 28 15:13:33 2020 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+#include "GPS.h"
+
+Serial pc(USBTX, USBRX);
+GPS gps(p9, p10);
+
+int main() {
+    while(1) {
+        if(gps.sample()) {
+            pc.printf("Longitude: %f degrees %c\n\rLatitude: %f degrees %c\n\rAltitude: %f meters \n\rUTC time: %f\n\r", gps.longitude, gps.ns, gps.latitude, gps.ew, gps.alt, gps.time);
+        } else {
+            pc.printf("Oh Dear! No lock :(\n\r");
+        }
+    }
+}
\ No newline at end of file
--- a/pulse_sensor.cpp	Sat Mar 28 14:42:29 2020 +0000
+++ b/pulse_sensor.cpp	Sat Mar 28 15:13:33 2020 +0000
@@ -3,7 +3,7 @@
 #include "uLCD_4DGL.h"
  
 Serial pc(USBTX, USBRX);
-uLCD_4DGL uLCD(p28,p27,p9);
+uLCD_4DGL uLCD(p28,p27,p19);
 
 int bpm;
 char bpm_string[3];