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.
Diff: SalinitySensor.h
- Revision:
- 0:ad9362f18797
- Child:
- 1:f448c12d2c5b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SalinitySensor.h Thu Jun 02 17:53:02 2016 +0000 @@ -0,0 +1,31 @@ +/* +* G3: WATERPLAY +*/ + +#ifndef SALINITY_SENSOR_H +#define SALINITY_SENSOR_H + +#include "mbed.h" + +class SalinitySensor +{ +public: + SalinitySensor( + PinName pin, + double const_voltage, + double const_converter, + double const_multiplier + ); + double read(); + double getVoltage(); + double getSalinity(); + +private: + AnalogIn _analog_in; + double _const_voltage; + double _const_converter; + double _const_multiplier; + double _voltage; +}; + +#endif \ No newline at end of file