Need assistance with coding

  • digitalRead(. . .)
    This returns HIGH or LOW not 1 or 0

  • Use #define macro to help document your code. Helps others understand too.
    Example
#define CLOSED   LOW
#define OPEN     HIGH
. . .
digitalWrite(fillvalve, LOW); //Initialize valve closed
//Change to:
digitalWrite(fillvalve, CLOSED);
1 Like

Thanks Larry I appreciate the information and will try it out.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.