Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: easy-connect-v16 Watchdog FP MQTTPacket RecordType-v-16 watersenor_and_temp_code
Sensor/ReadSensor.cpp
- Committer:
- DuyLionTran
- Date:
- 2017-12-12
- Revision:
- 18:5585365d6951
- Child:
- 32:8226837c56ae
File content as of revision 18:5585365d6951:
#include "mbed.h" #include "ReadSensor.h" const float saturationValueTab[41] = { //saturation dissolved oxygen concentrations at various temperatures 14.46, 14.22, 13.82, 13.44, 13.09, 12.74, 12.42, 12.11, 11.81, 11.53, 11.26, 11.01, 10.77, 10.53, 10.30, 10.08, 9.86, 9.66, 9.46, 9.27, 9.08, 8.90, 8.73, 8.57, 8.41, 8.25, 8.11, 7.96, 7.82, 7.69, 7.56, 7.43, 7.30, 7.18, 7.07, 6.95, 6.84, 6.73, 6.63, 6.53, 6.41, }; float saturationDoVoltage; float saturationDoTemperature; float averageVoltage; AnalogIn phSensor(SENSOR_1_PIN); AnalogIn DOSensor(SENSOR_2_PIN); void SENSOR_PHCalib() { } float SENSOR_ReadPHADC() { return phSensor.read(); } float SENSOR_GetPHValue() { }