Refactor Sensors to remove publish responsibility and instead return values. Add Screen class to output to OLED screen.

This commit is contained in:
Robert Marshall 2019-03-03 21:37:31 +00:00
parent 12e756fef1
commit d51b140050
5 changed files with 81 additions and 27 deletions

View file

@ -13,18 +13,16 @@
class Sensors {
int _temperaturePin;
char *_temperatureTopic;
char *_phTopic;
float _pHStep = (PH_7_VOLTAGE - PH_4_VOLTAGE) / 3;
Adafruit_ADS1115 _ads;
DallasTemperature* _ds18b20;
Networking* _networking;
Networking *_networking;
public:
Sensors(int temperaturePin, char *temperatureTopic, char *phTopic, Networking *networking, DallasTemperature* ds18b20);
Sensors(int temperaturePin, Networking *networking, DallasTemperature* ds18b20);
void setup();
float readpH();
void publishpH();
void publishTemperature();
const char *getpH();
const char *getTemperature();
};
#endif