iot_water_monitor_v2

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

Committer:
DuyLionTran
Date:
Sun Mar 04 07:57:56 2018 +0000
Revision:
41:6aed398adcc4
Parent:
39:a5ee98bd0050
Child:
43:dcde0e66874a
* version 2.7 	03-04-2018: DO calibration complete. IDWD is added

Who changed what in which revision?

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