Network, SD, Readall. comments added

Dependencies:   Peripherals Buffer_lib_v2 SD_Lib_EffedUP_ERP Time_Lib_v2 Year3_Version5 BMP280 Network_Lib TextLCD BME280

Committer:
erolleyparnell
Date:
Fri Jan 04 19:30:06 2019 +0000
Revision:
18:91285f9cfdb2
Parent:
17:a3cc9013316c
Child:
19:8c5615d0768d
ERP

Who changed what in which revision?

UserRevisionLine numberNew contents of line
noutram 0:90e393878517 1 #include "mbed.h"
emilytrembeth 4:da63962bc0f1 2 #include "TextLCD.h"
emilytrembeth 4:da63962bc0f1 3 #include "SDBlockDevice.h"
emilytrembeth 4:da63962bc0f1 4 #include "FATFileSystem.h"
erolleyparnell 8:dde5976445b4 5 #include "thread_functions.hpp"
erolleyparnell 11:799025124e87 6 #include "SD_functions.hpp"
erolleyparnell 11:799025124e87 7 #include "peripherals.hpp"
emilytrembeth 15:00422efe0550 8 #include "Network.hpp"
emilytrembeth 5:60e116a1e913 9
erolleyparnell 13:a89d4591af3f 10 #ifndef SD_Present
erolleyparnell 13:a89d4591af3f 11 #define SD_Present
erolleyparnell 13:a89d4591af3f 12 #endif
erolleyparnell 13:a89d4591af3f 13
erolleyparnell 13:a89d4591af3f 14 #ifndef DEBUG
erolleyparnell 13:a89d4591af3f 15 #define DEBUG
erolleyparnell 13:a89d4591af3f 16 #endif
erolleyparnell 13:a89d4591af3f 17
emilytrembeth 15:00422efe0550 18 //Serial pc(SERIAL_TX, SERIAL_RX);
emilytrembeth 4:da63962bc0f1 19 time_t currentTime;
emilytrembeth 4:da63962bc0f1 20 Mutex date_mutex;
emilytrembeth 5:60e116a1e913 21 int setting;
emilytrembeth 5:60e116a1e913 22 int t;
noutram 0:90e393878517 23
cgogay 16:17e8f7d4241a 24 Thread t1(osPriorityRealtime); //sensor thread is highest priority
cgogay 16:17e8f7d4241a 25 Thread t2(osPriorityNormal);
cgogay 16:17e8f7d4241a 26 Thread t3(osPriorityNormal);
cgogay 16:17e8f7d4241a 27 Thread t4(osPriorityNormal);
cgogay 7:981670f59caf 28
cgogay 7:981670f59caf 29
cgogay 7:981670f59caf 30 //LDR sensor
cgogay 7:981670f59caf 31 AnalogIn LDD_ADC_In(A1);
cgogay 7:981670f59caf 32 float fLDR = 0.0;
cgogay 7:981670f59caf 33 float volts = 0.0;
cgogay 7:981670f59caf 34
emilytrembeth 4:da63962bc0f1 35
cgogay 6:2ef9c06ce506 36 //Main thread
cgogay 6:2ef9c06ce506 37 int main() {
cgogay 6:2ef9c06ce506 38
erolleyparnell 11:799025124e87 39 //Power On Check TODO
emilytrembeth 15:00422efe0550 40 lcd.cls();
cgogay 6:2ef9c06ce506 41
cgogay 17:a3cc9013316c 42 //FunctionSD1();
cgogay 17:a3cc9013316c 43
cgogay 6:2ef9c06ce506 44 // run threads
cgogay 6:2ef9c06ce506 45 t1.start(FunctionSensor);
erolleyparnell 18:91285f9cfdb2 46 t2.start(FunctionSerial);
cgogay 17:a3cc9013316c 47 t3.start(FunctionSD1);
emilytrembeth 15:00422efe0550 48 t4.start(Network);
cgogay 6:2ef9c06ce506 49 }