So, I'm pretty new to arduino.
What I am trying to do is find the code to use one button to cycle through about 5-10 different vibration options.
press 1 = 50 50
press 2 = 100 100 etc...
I wanted to be able to use two buttons to select up and down , but I will be happy with one. What I have gathered so far is that I should use a hardware debounce and interrupts in the sketch, I just don't know how.
Can anyone point me in the direction of something a begginer could understand? Thank you.
What I have gathered so far is that I should use a hardware debounce and interrupts in the sketch, I just don't know how.
Most likely wrong in both respects, but you need to explain what
press 1 = 50 50
press 2 = 100 100 etc.
means.
When I press the button once. I want the motor to start and stop at a rate of 50 milliseconds on and 50 milliseconds off.
When I press the button again. I want the motor to start and stop at a rate of 100 milliseconds on and 100 milliseconds off.
When I press the button again. I want the motor to start and stop at a rate of 200 milliseconds on and 200 milliseconds off.
and so on until it loops back around to not turning off and on.
And at the last combination, pushing the switch again cycles round to the first one?
and the blink without delay example should get you started.
Thank you! Those both look very close to what I want. I just don't know how to combine the two.