iot_water_monitor_v2

Dependencies:   easy-connect-v16 Watchdog FP MQTTPacket RecordType-v-16 watersenor_and_temp_code

Committer:
DuyLionTran
Date:
Tue Apr 03 17:03:01 2018 +0000
Revision:
57:898fcb6692cd
Parent:
50:5a19fc4b41d9
;   * version 2.9.8  	03-04-2018  Minor changes. Time frame updated to IBM Watson every 60s

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DuyLionTran 32:8226837c56ae 1 #include "CommandExecution.h"
DuyLionTran 50:5a19fc4b41d9 2 #include "flash_programming.h"
DuyLionTran 39:a5ee98bd0050 3 #include "ReadSensor.h"
DuyLionTran 32:8226837c56ae 4 #include "mbed.h"
DuyLionTran 32:8226837c56ae 5
DuyLionTran 32:8226837c56ae 6 DigitalOut relay1(RELAY_1_PIN);
DuyLionTran 32:8226837c56ae 7 DigitalOut relay2(RELAY_2_PIN);
DuyLionTran 34:601effb7b7fe 8 DigitalOut relay3(RELAY_3_PIN);
DuyLionTran 32:8226837c56ae 9
DuyLionTran 50:5a19fc4b41d9 10 extern bool isCalibrating;
DuyLionTran 50:5a19fc4b41d9 11 extern bool isUploadImmediately;
DuyLionTran 50:5a19fc4b41d9 12 extern float doValue;
DuyLionTran 41:6aed398adcc4 13
DuyLionTran 34:601effb7b7fe 14 void CE_HandleRelays(int Relay1State, int Relay2State, int Relay3State) {
DuyLionTran 32:8226837c56ae 15 relay1 = Relay1State;
DuyLionTran 32:8226837c56ae 16 relay2 = Relay2State;
DuyLionTran 34:601effb7b7fe 17 relay3 = Relay3State;
DuyLionTran 32:8226837c56ae 18 }
DuyLionTran 35:fc800d35c1ba 19
DuyLionTran 35:fc800d35c1ba 20 void CE_SetRTCTime(uint32_t CurrentEpochTime) {
DuyLionTran 36:d0b628087ac8 21 printf("New local time value set\r\n");
DuyLionTran 35:fc800d35c1ba 22 set_time(CurrentEpochTime);
DuyLionTran 39:a5ee98bd0050 23 }
DuyLionTran 39:a5ee98bd0050 24
DuyLionTran 39:a5ee98bd0050 25 void CE_Calibrate() {
DuyLionTran 41:6aed398adcc4 26 isCalibrating = true;
DuyLionTran 43:dcde0e66874a 27 }
DuyLionTran 43:dcde0e66874a 28
DuyLionTran 43:dcde0e66874a 29 void CE_SetAlarmRelays() {
DuyLionTran 43:dcde0e66874a 30
DuyLionTran 43:dcde0e66874a 31 }
DuyLionTran 43:dcde0e66874a 32
DuyLionTran 43:dcde0e66874a 33 void CE_UpdateImmediately() {
DuyLionTran 48:a7ed665844cd 34 isUploadImmediately = true;
DuyLionTran 50:5a19fc4b41d9 35 }
DuyLionTran 50:5a19fc4b41d9 36