Go Down

Topic: Stepper Motor Control with Arcade Joystick (Read 4 times) previous topic - next topic

ash901226


TheBlommie

Hi Ash

Can you show me on my last connection diagram how to connect the second button? I only did the connection for one button, but I guess the second button will also have a transistor and my logic tells me that somehow some button pins will have to be connected as well...

Please advice.

Regards

Ian

ash901226

Ian,
For connecting button there are 2 way to connect multiple button to the arduino, first is the digital way if you have enough port for it. second is by using a resistor ladder and switch set up that is kinda hard to explain unless theres a diagram.
anyway for your setup, just you the first type since you have more then enough port for your project .
anyway for button 2 you need to make another set of the same connection as you did for the first button, now the middle bit between the resistor and the switch is put to port 4

TheBlommie

Hey Ash

Good news, I connected the second button of the arcade joystick and with a little bit of trial and error I got it working. However, I connected the wires slightly different from the way you mentioned, but it is still working just fine.

Now, since I decided to use the arcade joystick for rotation control, I need to be able to set a variable speed for the motor by using a potentiometer. I'll connect the pot to an analog input... What do I do code-wise? I think this will be the last scope of the project and then I can start with a box design for everything. As time goes on I'll think about connecting a LCD screen for visual speed references to show what the speed is while turning the pot. But for now it is not a real concern to me.

I'll appreciate your help my friend! In theory I know that the same mapping method we used for the thumb joystick will be used to determine what the value of the pot is and then this value will be used for the speed of the motor, right? But practical I'm still learning the ropes, hehe.

Thanks

Ian

ash901226

i can ssay that the sam eidea apply but now the mapping is different ....

Go Up