Programmable 4wd robot with start button

Hello everyone!:slight_smile: I'm curious if it is possible to make 4wd programmed arduino robot with additional buttons. In other words, there's 4wd robot and there are 4 direction buttons(right,left,forward,backward) and start button. I want to make it like if someone pushes combinations like right-right-left-forward, it should go 2 steps to right, 1step to left and to forward. After setting this combos, start button should be pressed so robot could move in the direction that has been set before. Dear all, tell me pls, is this possible in arduino? I've searched many resources, unfortunately I haven't found anything similar to my case. Thanks.

cs_dmitry:
is this possible in arduino?

The answer to that is probably "yes", but I suspect there's more to your question that just that, and that there's a hidden "if so, how?" in what you're asking.

One could count the presses of each button using state change detection and then in some "for" loops use those values to play back the occurences of each step. (Although I'm having difficulty picturing what it means for a wheeled robot to ...

go 2 steps to right

I've searched many resources, unfortunately I haven't found anything similar to my case.

You won't: isn't that the beauty of a empty box like an Arduino- you can fill it with any code you like.

One thing that strikes me since I replied is, would the buttons always be in the same order, and would you ever need to "reuse" a button in the same "batch"?

The programming would be very different if 2, 5, 0, 3 always meant 2 right, 5 left, 0 forward, 3 back always in the order right/left/forward/back compared to a sort of random sequence of 2 right, 5 left, 7 back, 4 right, 1 forward, 5 back, 3 left etc etc.

Please to not cross-post. Answered elsewhere!

Steve

moShellShocker:
One thing that strikes me since I replied is, would the buttons always be in the same order, and would you ever need to "reuse" a button in the same "batch"?

The programming would be very different if 2, 5, 0, 3 always meant 2 right, 5 left, 0 forward, 3 back always in the order right/left/forward/back compared to a sort of random sequence of 2 right, 5 left, 7 back, 4 right, 1 forward, 5 back, 3 left etc etc.

Thx for reply, moShellShocker:) Yeah, the buttons are static, e.g 2 right, 5 left, 0 forward, 3 back always for right/left/forward/back as you mentioned. There's no needs to "reuse" button, since there's stop button.
P.S. moShellShocker, could you please move your replies to this topic Programmable 4wd robot with start button - Robotics - Arduino Forum? The thing is that I don't want to flood this amazing forum with multiple ordinary threads. thank you:) after I delete this topic and will continue discuss in the mentioned link.

slipstick:
Please to not cross-post. Answered elsewhere!

Steve

Sorry:(

So to confirm, you press each button some number of times, always in that order... Quite easy then Id say. Use state change detect to count each press and probably put those 4 numbers into a 4 element array. Then switch to "run" mode with another button and run the motors according to the numbers in the array.