iot_water_monitor_v2

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

Committer:
DuyLionTran
Date:
Wed Feb 21 03:41:23 2018 +0000
Revision:
39:a5ee98bd0050
Parent:
36:d0b628087ac8
Child:
41:6aed398adcc4
* version 2.6.5 	02-21-2017: developing calibration. Sensor read is completely ok

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 34:601effb7b7fe 9 void CE_HandleRelays(int Relay1State, int Relay2State, int Relay3State) {
DuyLionTran 32:8226837c56ae 10 relay1 = Relay1State;
DuyLionTran 32:8226837c56ae 11 relay2 = Relay2State;
DuyLionTran 34:601effb7b7fe 12 relay3 = Relay3State;
DuyLionTran 32:8226837c56ae 13 }
DuyLionTran 35:fc800d35c1ba 14
DuyLionTran 35:fc800d35c1ba 15 void CE_SetRTCTime(uint32_t CurrentEpochTime) {
DuyLionTran 36:d0b628087ac8 16 printf("New local time value set\r\n");
DuyLionTran 35:fc800d35c1ba 17 set_time(CurrentEpochTime);
DuyLionTran 39:a5ee98bd0050 18 }
DuyLionTran 39:a5ee98bd0050 19
DuyLionTran 39:a5ee98bd0050 20 void CE_Calibrate() {
DuyLionTran 39:a5ee98bd0050 21 SENSOR_DoCalibration();
DuyLionTran 35:fc800d35c1ba 22 }