fuck this

Dependencies:   BMP280

main.cpp

Committer:
mwthewsey
Date:
2018-01-08
Revision:
11:b538e73841ae
Parent:
10:261f2b69c4c7
Child:
12:03589f1d5c30

File content as of revision 11:b538e73841ae:

#include "mbed.h"
#include "WebUI.h"
#include "Serial.h"
#include "Sampling.h"
#include "LCD.h"
#include "SDCard.h"
#include "SDBlockDevice.h"
#include "FATFileSystem.h"


//SD Card Object
SDBlockDevice sd(D11, D12, D13, D10); // mosi, miso, sclk, cs
//LCD Object
ENVDISPLAY lcd(D9, D8, D7, D6, D4, D2,PE_12, PE_14);
//File pointer for the SD card
FILE* fp;

int main()
{
    //Initialise devices
////WebUISetup();
    
    
    //Hardware Self Test
    
    //Initialise interrupts and times
    SerialStart();
    lcd.Start();
    ConfigThreadsAndIR();
    firstSample = true; //Set only at start of program
    
    //Run
    while (true)
    {
        if (NewEnvSample && NewLDRSample)
        {
            //New samples have been captured and are in the register
            IncrementIndex();
            //LCD Update Function
            NewEnvSample = false;
            NewLDRSample = false;
            lcd.UpdateData(tempReadings[currentIndex],presReadings[currentIndex],LDRReadings[currentIndex],timeReadings[currentIndex]);

        }
        
    }   
}