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.
SalinitySensor.h
- Committer:
- mariosimaremare
- Date:
- 2016-06-22
- Revision:
- 11:dcaaf1bb21ce
- Parent:
- 5:4cbe44452889
- Child:
- 15:e112bab9aa2f
File content as of revision 11:dcaaf1bb21ce:
/* * G3: WATERPLAY */ #ifndef SALINITY_SENSOR_H #define SALINITY_SENSOR_H #include "mbed.h" #include "Printer.h" class SalinitySensor { public: SalinitySensor( Printer &printer, PinName pin ); static const double VIN = 3.3; static const double CONVERTER = 1.6667; static const double MULTIPLIER = 16.3; static const double VARIANCE = 0.0; 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(); double getSalinity(); double getStatus(); char* getStrStatus(); private: Printer &_printer; AnalogIn _analog_in; double _reading; double _voltage; double _salinity; double _status; char* _strStatus; }; #endif