fuck this

Dependencies:   BMP280

Committer:
Swaggie
Date:
Thu Jan 04 17:34:57 2018 +0000
Revision:
7:bf9f92ff02e8
Parent:
6:8e1795a5886b
Child:
9:ac5673cca703
Child:
14:1fb1354ac27c
Sampling functions and flow now complete, except for time.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
noutram 0:65ff7ad381e8 1 #include "mbed.h"
Swaggie 2:5a38ae8459d5 2 #include "WebUI.h"
Swaggie 2:5a38ae8459d5 3 #include "Serial.h"
Swaggie 3:8fa1e77c8a5d 4 #include "Sampling.h"
Swaggie 3:8fa1e77c8a5d 5 #include "LCD.h"
Swaggie 5:bea93c8e50b7 6 #include "SDBlockDevice.h"
Swaggie 5:bea93c8e50b7 7 #include "FATFileSystem.h"
Swaggie 5:bea93c8e50b7 8
Swaggie 6:8e1795a5886b 9
Swaggie 6:8e1795a5886b 10
Swaggie 5:bea93c8e50b7 11 //SD Card Object
Swaggie 5:bea93c8e50b7 12 SDBlockDevice sd(D11, D12, D13, D10); // mosi, miso, sclk, cs
Swaggie 5:bea93c8e50b7 13 //File pointer for the SD card
Swaggie 5:bea93c8e50b7 14 FILE* fp;
noutram 0:65ff7ad381e8 15
noutram 0:65ff7ad381e8 16 int main()
noutram 0:65ff7ad381e8 17 {
Swaggie 2:5a38ae8459d5 18 //Initialise devices
Swaggie 4:2e6d9492b76d 19 WebUISetup();
noutram 0:65ff7ad381e8 20
Swaggie 5:bea93c8e50b7 21
Swaggie 2:5a38ae8459d5 22 //Hardware Self Test
Swaggie 2:5a38ae8459d5 23
Swaggie 7:bf9f92ff02e8 24 //Initialise interrupts and times
Swaggie 6:8e1795a5886b 25 ConfigThreadsAndIR();
Swaggie 7:bf9f92ff02e8 26 firstSample = true; //Set only at start of program
Swaggie 6:8e1795a5886b 27
Swaggie 6:8e1795a5886b 28 //Run
Swaggie 7:bf9f92ff02e8 29 while (true)
Swaggie 6:8e1795a5886b 30 {
Swaggie 6:8e1795a5886b 31 if (NewEnvSample && NewLDRSample)
Swaggie 6:8e1795a5886b 32 {
Swaggie 7:bf9f92ff02e8 33 //New samples have been captured and are in the register
Swaggie 7:bf9f92ff02e8 34 IncrementIndex();
Swaggie 6:8e1795a5886b 35 //LCD Update Function
Swaggie 6:8e1795a5886b 36 NewEnvSample = false;
Swaggie 6:8e1795a5886b 37 NewLDRSample = false;
Swaggie 6:8e1795a5886b 38 }
Swaggie 6:8e1795a5886b 39 }
Swaggie 7:bf9f92ff02e8 40 }