Go Down

Topic: Arduino Joystick Coding (Read 1 time) previous topic - next topic


Feb 05, 2013, 04:23 am Last Edit: Feb 05, 2013, 04:43 am by PeterH Reason: 1
I recommend that you make the steering control speed sensitive, with steering authority reducing as the speed rises. Also consider designing the speed control so that 'full throttle' ramps the power up progressively rather than slamming you into full power. (I guess there will be plenty of cross-talk between steering and throttle inputs when it's being used by somebody with poor limb control.)

If you're planning to use a conventional IC gokart then the controls are likely to be quite heavy so you'll need a substantial power supply. Make sure you consider what happens if the supply fails or the battery goes flat while the kart is in motion. Also I'd think that safety might be a major concern - have you addressed that aspect thoroughly?
I only provide help via the forum - please do not contact me for private consultancy.


Cross posting is bad! Ask everyone to forgive you and admin to combine posts!

Nick Gammon

Please do not cross-post. This wastes time and resources as people attempt to answer your question on multiple threads.

... we are very inexperienced ...

Are you inexperienced in general forum etiquette, too?

Threads merged.

- Moderator


Ahh, now I see that you are using a digital joystick. So, forget the analog pins. You will need to manually increase and decrease acceleration based on how long the joystick is pushed forward/backward. Basically a timer that checks the switch for its state and if it is still low, it will increase/decrease the speed. How that is done depends on how you are controlling speed (ESC, H-bridge with PWM?)

And I agree with the poster above that using the same joystick for both steering and speed could be dangerous. A wheelchair does this, yes, but it is using two wheels and going rather slow. I do assume that your disabled client knows how to use these controls, though since that IS how a wheelchair is operated. Just understand that at high speeds, there is going to be jerking of the rider going on, which may cause unwanted pushes of the joystick.

You can counteract that in the control scheme mentioned above. Check the state of the switches on timer. Then if a sudden bump happens, it will not accelerate/decelerate. Only when the stick is continually held in a direction will it respond.


Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

Go Up