Comments added
Dependencies: Peripherals Buffer_lib_v2 SD_Lib_EffedUP_ERP Time_Lib_v2 Year3_Version5 BMP280 Network_Lib TextLCD BME280
main.cpp
- Committer:
- emilytrembeth
- Date:
- 2019-01-18
- Revision:
- 19:8c5615d0768d
- Parent:
- 18:91285f9cfdb2
- Child:
- 20:15f22e814788
File content as of revision 19:8c5615d0768d:
#include "mbed.h" #include "TextLCD.h" #include "SDBlockDevice.h" #include "FATFileSystem.h" #include "thread_functions.hpp" #include "SD_functions.hpp" #include "peripherals.hpp" #include "Network.hpp" #include "time_functions.hpp" #ifndef SD_Present #define SD_Present #endif #ifndef DEBUG #define DEBUG #endif //Serial pc(SERIAL_TX, SERIAL_RX); time_t currentTime; Mutex date_mutex; int setting; int t; Thread t1(osPriorityRealtime); //sensor thread is highest priority Thread t2(osPriorityNormal); Thread t3(osPriorityNormal); Thread t4(osPriorityNormal); Thread t5(osPriorityNormal); //LDR sensor AnalogIn LDD_ADC_In(A1); float fLDR = 0.0; float volts = 0.0; //Main thread int main() { //Power On Check TODO lcd.cls(); //FunctionSD1(); // run threads t1.start(FunctionSensor); t2.start(FunctionSerial); t3.start(FunctionSD1); t4.start(Network); t5.start(UpdateTime); }