I try to make arduino controller for my old dishwasher. On internet I found code for Arduino Duemillanove, and write to my Mega 2560. Text for display is Serbian but you understand easy from the code. My problem is program selection and start. Also, when I press button for start, program freeze on "Draining". I am beginner, and no way to solve problem. Also, maybe is good idea to change code to one program (intensive washing). Just START and go. Thanks a lot.
If it's frozen in Drain mode then presumably it's looping here:
while (fillSensState == HIGH) {
actDrainPumpON();
fillSensState = digitalRead(fillSens);
}
I'd put some serial debugging statements in to prove it. Then I'd check that the drain pump is actually doing something - if it's not moving water then no surprise that no further progress is made. If the pump's doing its job, the other potential problem is that the fillsensor isn't reading correctly. Need to test that too.
Could there be interference when the pump is switched, crashing the Arduino (ie have you paid
attention to protecting from electrical interference?) You probably need to in a device with
big motors and mains switching.
I'd put some serial debugging statements in to prove it. Then I'd check that the drain pump is actually doing something - if it's not moving water then no surprise that no further progress is made. If the pump's doing its job, the other potential problem is that the fillsensor isn't reading correctly. Need to test that too.
A time-out / abort check would be a good idea too. Rather than burning out motor by running it forever.
@J-M-L I want help with this code. Try it without relays. Just board and display. On start, program is freeze. Welcome message and program is mixed on display. I dont know why is stuck
popovicr: @J-M-L I want help with this code. Try it without relays. Just board and display. On start, program is freeze. Welcome message and program is mixed on display. I dont know why is stuck
the program expects sensors to be connected. as gfvalvo states