iot_water_monitor_v2
Dependencies: easy-connect-v16 Watchdog FP MQTTPacket RecordType-v-16 watersenor_and_temp_code
Diff: Sensor/ReadSensor.h
- Revision:
- 18:5585365d6951
- Child:
- 32:8226837c56ae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sensor/ReadSensor.h Tue Dec 12 17:54:04 2017 +0000 @@ -0,0 +1,30 @@ +#ifndef __READSENSOR_H__ +#define __READSENSOR_H__ + +#define SENSOR_1_PIN (A0) +#define SENSOR_2_PIN (A1) +#define SENSOR_3_PIN (A3) +#define SENSOR_4_PIN (A4) + +#define SaturationDoVoltageAddress 12 //the address of the Saturation Oxygen voltage stored in the Flash +#define SaturationDoTemperatureAddress 16 //the address of the Saturation Oxygen temperature stored in the Flash + +#define VREF 3.3 +#define SCOUNT 30 + +/** brief Perform calibration for pH sensor + * retral None + */ +void SENSOR_PHCalib(); + +/** brief Read the analog value of pH sensor + * retral pH ADC value + */ +float SENSOR_ReadPHADC(); + +/** brief Convert the ADC value read from pH sensor into pH value + * retral pH value + */ +float SENSOR_GetPHValue(); + +#endif /* __READSENSOR_H__ */ \ No newline at end of file