I need to run 3 modes of operation if 3 push buttons are pushed in arduino. I have made the initiate code logic for one push button and one operation but I got an error message of “redefinition of int ena1”.
if button 1 is pushed then the motor should rotate in slow speed.
if button 2 is pushed then the motor should rotate in medium speed.
if button 3 is pushed then the motor should rotate in high speed.
If I got some suggestion on how to define the code block for the above logic it would be a great help for me to derive at the solution.
Please help me to correct the code.
trial_2.ino (5.73 KB)