Help with code running two solenoids through relays.

Okay so I have sought out help from tutors, my instructor and nobody can give me a reasonable answer as to why my code becomes stuck in a loop inside of this if else statement and I have tried troubleshooting it just by serial printing a lot of things. Here is the code, any suggestions or questions will be greatly appreciated.

FishtankCode2016.ino (13.9 KB)

I'm supposed to find some unspecified if statement in 14kb of code? Really?

If you have time to actually figure out whats going on, I noted in the code the section of an if else statement that the code seems to set in a loop and doesnt get out of that if else statement, I have exhausted every other option.

Hi,

If you have time to actually figure out whats going on, I noted in the code the section of an if else statement that the code seems to set in a loop and doesnt get out of that if else statement, I have exhausted every other option.

A lot of time is something a lot of us on the forum don't necessarily have, the more info about what and how it does and does not function will help us a lot.
What is the application, what is the sketches function?
Sorry I can't see which if statement you have noted, can you note the problem area in all capital letters please.
What model Arduino are you using?

Tom..... :slight_smile:

TomGeorge:
Hi,
A lot of time is something a lot of us on the forum don't necessarily have

.... C'mon Tom, it's weekend....hobby time :o

@Krusser56: I've drawn mods' attention to the identical question in Robotics:cross-posting is not allowed.

Serial printing is a good start: you should now try to pare the code down to the bare minimum which still exhibits the problem. That exercise in itself may well solve the problem, but if not will at least leave a more manageable sketch here for others to look at.

edit.... I don't see the marked part either. Stick a line of //<<<<<<<<<<<< or something in to highlight it

Do not cross-post. Other thread removed.

(Thanks, JimboZA. Did you get your avatar set the way you want?)

Hi,

.... C'mon Tom, it's weekend....hobby time :o

Clipsal 500 on the telly, brum brum..... lol
But we need more info...

Tom.... :slight_smile:

(It's back to what I had it, going back to the default was a curiosity more than anything, since I noticed there was no "remove" option.)