iot_water_monitor_v2

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

Committer:
DuyLionTran
Date:
Tue Dec 12 17:54:04 2017 +0000
Revision:
18:5585365d6951
Child:
32:8226837c56ae
version 1.6: Project is re-organized, RTC is added, Sensor Calibration and Flash is being developed

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DuyLionTran 18:5585365d6951 1 #ifndef __READSENSOR_H__
DuyLionTran 18:5585365d6951 2 #define __READSENSOR_H__
DuyLionTran 18:5585365d6951 3
DuyLionTran 18:5585365d6951 4 #define SENSOR_1_PIN (A0)
DuyLionTran 18:5585365d6951 5 #define SENSOR_2_PIN (A1)
DuyLionTran 18:5585365d6951 6 #define SENSOR_3_PIN (A3)
DuyLionTran 18:5585365d6951 7 #define SENSOR_4_PIN (A4)
DuyLionTran 18:5585365d6951 8
DuyLionTran 18:5585365d6951 9 #define SaturationDoVoltageAddress 12 //the address of the Saturation Oxygen voltage stored in the Flash
DuyLionTran 18:5585365d6951 10 #define SaturationDoTemperatureAddress 16 //the address of the Saturation Oxygen temperature stored in the Flash
DuyLionTran 18:5585365d6951 11
DuyLionTran 18:5585365d6951 12 #define VREF 3.3
DuyLionTran 18:5585365d6951 13 #define SCOUNT 30
DuyLionTran 18:5585365d6951 14
DuyLionTran 18:5585365d6951 15 /** brief Perform calibration for pH sensor
DuyLionTran 18:5585365d6951 16 * retral None
DuyLionTran 18:5585365d6951 17 */
DuyLionTran 18:5585365d6951 18 void SENSOR_PHCalib();
DuyLionTran 18:5585365d6951 19
DuyLionTran 18:5585365d6951 20 /** brief Read the analog value of pH sensor
DuyLionTran 18:5585365d6951 21 * retral pH ADC value
DuyLionTran 18:5585365d6951 22 */
DuyLionTran 18:5585365d6951 23 float SENSOR_ReadPHADC();
DuyLionTran 18:5585365d6951 24
DuyLionTran 18:5585365d6951 25 /** brief Convert the ADC value read from pH sensor into pH value
DuyLionTran 18:5585365d6951 26 * retral pH value
DuyLionTran 18:5585365d6951 27 */
DuyLionTran 18:5585365d6951 28 float SENSOR_GetPHValue();
DuyLionTran 18:5585365d6951 29
DuyLionTran 18:5585365d6951 30 #endif /* __READSENSOR_H__ */