PROJ515 / Mbed OS ELEC-351-GROUP-E-CW

Dependencies:   BMP280

Files at this revision

API Documentation at this revision

Comitter:
Swaggie
Date:
Tue Jan 02 13:29:00 2018 +0000
Parent:
4:2e6d9492b76d
Child:
6:8e1795a5886b
Commit message:
Added SD Card and environmental sensor libraries

Changed in this revision

BME280.lib Show annotated file Show diff for this revision Revisions of this file
BMP280.lib Show annotated file Show diff for this revision Revisions of this file
Sampling.cpp Show annotated file Show diff for this revision Revisions of this file
Sampling.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
sd-driver.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BME280.lib	Tue Jan 02 13:29:00 2018 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/MACRUM/code/BME280/#c1f1647004c4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BMP280.lib	Tue Jan 02 13:29:00 2018 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/charly/code/BMP280/#d22ecbef9b90
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sampling.cpp	Tue Jan 02 13:29:00 2018 +0000
@@ -0,0 +1,13 @@
+#include "Sampling.h"
+#include "mbed.h"
+
+void SampleTimerISR(void)
+{
+    //Flag Threads
+}
+    
+
+void ConfigThreadsAndIR(void)
+{
+   
+}
\ No newline at end of file
--- a/Sampling.h	Tue Jan 02 12:47:08 2018 +0000
+++ b/Sampling.h	Tue Jan 02 13:29:00 2018 +0000
@@ -1,6 +1,18 @@
 #ifndef __Sampling__
 #define __Sampling__
 
+#ifdef BME
+#include "BME280.h"
+#else
+#include "BMP280.h"
+#endif
+
+#ifdef BME
+extern BME280 sensor;
+#else
+extern BMP280 sensor;
+#endif
+
 void SampleTimerISR(void);
 //Called by ticker. Calls the sample funcs of each device by flagging the threads
 
@@ -8,6 +20,6 @@
 //Setup Interrupts and Threads
 
 void InitiateHW(void);
-
+//
 
 #endif
\ No newline at end of file
--- a/main.cpp	Tue Jan 02 12:47:08 2018 +0000
+++ b/main.cpp	Tue Jan 02 13:29:00 2018 +0000
@@ -3,12 +3,20 @@
 #include "Serial.h"
 #include "Sampling.h"
 #include "LCD.h"
+#include "SDBlockDevice.h"
+#include "FATFileSystem.h"
+
+//SD Card Object
+SDBlockDevice sd(D11, D12, D13, D10); // mosi, miso, sclk, cs
+//File pointer for the SD card
+FILE* fp;
 
 int main()
 {
     //Initialise devices
     WebUISetup();
     
+    
     //Hardware Self Test
     
     //Initilaiase interrupts and times
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sd-driver.lib	Tue Jan 02 13:29:00 2018 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/sd-driver/#ae7e7440054c9447f8255bdccbcc523b3f6dffe4