I need some help getting my sketch to work as it should, I have made a wiper controller with 3 intermittent and 1 slow speed, motor parking is a hall effect sensor, I can get the code to see the park sensor and it seems to work on intermittent 1 after a fashion. However, I am unsure if I have managed to code it so as to move the motor off the park switch, then make it run until it sees the parking switch again, then perform a delay and start over again. it would be easier if it had self parking built into the motor, unfortunately it does not.
Ideally I do not want to change the pin configuration, I do wonder if using interrupts may help and possibly a better method of making the delay.
The delay method I have used is also somewhat inadequate as it seems to hang if you move the rotary switch to any of the other positions, say from intermittent 3 to slow, it then starts to work again after the time the delay in seconds that it happens to be on.
My coding is limited at best. I would gladly pay someone who really knows how to write code and to get this working.
Timer_sub_loops_semi_working_version.ino (5.46 KB)