
sd, network
Dependencies: Peripherals SD_Lib_EffedUP_ERP Time_Lib_v2 Year3_Version5 BMP280 Network_Lib TextLCD BME280 Buffer
main.cpp
- Committer:
- emilytrembeth
- Date:
- 2019-01-23
- Revision:
- 25:ef3ee210fed5
- Parent:
- 24:bacf24afe91f
File content as of revision 25:ef3ee210fed5:
#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 //Serial pc(SERIAL_TX, SERIAL_RX); time_t currentTime; Mutex date_mutex; int setting; int t; Thread sensor_thread(osPriorityRealtime); //sensor thread is highest priority Thread serial_thread(osPriorityNormal); Thread SD_Card_thread(osPriorityNormal); Thread Network_thread(osPriorityNormal); Thread Update_time_thread(osPriorityNormal); Thread Print_thread(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 sensor_thread.start(FunctionSensor); // serial_thread.start(FunctionSerial); SD_Card_thread.start(FunctionSD1); Network_thread.start(Network); // Update_time_thread.start(UpdateTime); }