Instantiate temperature sensor in entry file because it doesn't want to work in the class.
This commit is contained in:
parent
ccbbf6e4c1
commit
059ebad84e
3 changed files with 30 additions and 12 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue