Instantiate temperature sensor in entry file because it doesn't want to work in the class.

This commit is contained in:
Robert Marshall 2019-02-02 08:36:07 +00:00
parent ccbbf6e4c1
commit 059ebad84e
3 changed files with 30 additions and 12 deletions

View file

@ -17,11 +17,11 @@ class Sensors {
char *_phTopic;
float _pHStep = (PH_7_VOLTAGE - PH_4_VOLTAGE) / 3;
Adafruit_ADS1115 _ads;
DallasTemperature _ds18b20;
DallasTemperature* _ds18b20;
Networking* _networking;
public:
Sensors(int temperaturePin, char *temperatureTopic, char *phTopic, Networking* networking);
Sensors(int temperaturePin, char *temperatureTopic, char *phTopic, Networking *networking, DallasTemperature* ds18b20);
void setup();
float readpH();
void publishpH();