Relative Content

Tag Archive for arduinoswitch-statementcasedefault

Switch case program advice

I am new to Arduino and have been playing around with this case statement for my fish feeder. It has a hole in the lid and spins on a stepper motor and the proxy picks it up as it spins around, the first case it to avoid it stopping at 180 degrees then case 1 inches it towards the prox and case 2 then is the run on the make it straight again as it comes back around. As I work away for a week at a time if the proxy fails, I want it to default can anyone give me advice on how they think this code has been written. I am currently away so have not tested it yet, the default is there so at least it spins once per 12 hours.