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:
- 5:4cbe44452889
- Parent:
- 3:7c648d1d8802
- Child:
- 11:dcaaf1bb21ce
--- a/SalinitySensor.h Fri Jun 17 09:24:01 2016 +0000 +++ b/SalinitySensor.h Fri Jun 17 11:03:37 2016 +0000 @@ -13,13 +13,14 @@ public: SalinitySensor( Printer &printer, - PinName pin, - double const_voltage, - double const_converter, - double const_multiplier, - double const_lower_boundary, - double const_upper_boundary + PinName pin ); + static const double VIN = 3.3; + static const double CONVERTER = 1.6667; + static const double MULTIPLIER = 16.3; + static const double LOWER_BOUNDARY = 3.0; + static const double UPPER_BOUNDARY = 6.9; + static const int SAMPLING_NUMBER = 100; void reload(); double getReading(); double getVoltage(); @@ -30,12 +31,6 @@ private: Printer &_printer; AnalogIn _analog_in; - double _const_voltage; - double _const_converter; - double _const_multiplier; - double _const_lower_boundary; - double _const_upper_boundary; - int _const_sample_number; double _reading; double _voltage; double _salinity;