d0ughb0y
Active member
I think there is a fault in your code.
When no sensors is available the loop contains running.
This lineCode:boolean initPH() { #ifdef _PH char phchars[15]; phchars[0]=0; Serial1.begin(38400); for (int i=0;i<255,strlen(phchars)==0;i++) { Serial1.print("e\rr\r"); delay(384); getresponse(phchars); }
has to be this lineCode:for (int i=0;i<255,strlen(phchars)==0;i++) {
Code:for (int i=0;i<255;i++) {
if you don't have any ph sensors, then you would comment out #define _PH, so the block of code won't even be included.
If it was disconnected, condition strlen(phchars)==0 will always be true, and i will eventually get to 255. The two conditions are ANDed.
(you can specify multiple conditions in a for loop).
Last edited: