Help with relay operation using while loop

(deleted)

Working_w_value_displaty.ino (9.24 KB)

while(waterCost << 5.00)
  {

Oops

@bakxr

Moved your topic to it's current location as it is more suitable.

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

(deleted)

I don't know what waterCost is, nor can I figure what good multiplying it by 32 will achieve.

(deleted)

You're left-shifting a float variable?
A float variable read from a Hall Effect sensor?
I don't get it.

bakxr:
I know my code doesn't work as of yet, I believe the comparison was < 5.00> However I was actually more concerned about the rest of the formatting in that if statement.

What are your concerns, specifically?

(deleted)

A well-written while loop inside an "if" is just the same as a while loop anywhere else, and probably as unwelcome and unnecessary.

The loop() function loops, and that is why while loops are often unwelcome and unnecessary.

Your while loop is not well-written.