Controlling two BTS7960 motor controllers with arduino joystick

I'm new to arduino and coding and need a sketch that allows the use of an arduino joystick with two (2) BTS7960 motor controllers. It needs to operate them as if it were for a wheel chair (for custom farm implement). Thanks in advance for any help.

What I normally do is search the library manager for a library about joysticks by one of the major players like Adafruit or Sparkfun, then look at their example sketches. Once you find one similar, copy it and go to work customizing it.

does Arduino company produce joysticks?

Hello;
I should have stated that is an Auduino compatible joystick. It's the typical x,y pot joystick you get from Ebay.

Hi, @sonofcy
Welcome to the forum.

Have you Googled;

joystick controlled wheelchair using arduino

Tom.. :smiley: :+1: :coffee: :australia:

Not me, the OP is @newtonsghost

Yes. Too much information. I just need the sketch.

Do the same as suggested in reply #2 but for motor controllers.

Forum is not a free give away code factory. We help You with how You can do the coding.

1 Like

Wow. I knew there would be people like you with this kind of response. I only need help to be pointed in the right direction. I'm happy to use what's available out ther already. I'm not asking anyone to sit down and write code for me. I've already tried following code I found on You Tube, and it didn't work.

Thank you. I will try this right away.

use IDE example "analog in serial out" to examine joysticks parameters. write it down. look videos when something not clear. after it, learn how BTS7960 will be handled.

You tube is not good for studying and copying code unless there is also an article where you can do the actual learning.

It's a very common mistake to think there's code that can be copied and do what You want. It never exists.
Get code that is as close as possible and modify it to suit Your needs.

For Your needs get joystick using code. Learn how it works and modify it for Your needs.
Do the same about controlling motors.

Merge/hook together Your modified codes to one code.
If there are problems, post that code and describe what's not meeting Your wishes.

Do you have a schematic?

Have you done any coding in Arduino?

Have you looked in the IDE examples of a joystick sketch?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

That's good adivce. I'll try that approach as well. I'll probably need some guidance on some of the modifications to any code. I kind of understand how the other sketch operated that I tried to copy. Some of my mistakes could have been with sytax as well. I'm defenitely ready to learn and put in the time needed to keep my project moving along. Thanks for the helpful advice.

I have just the experience of following along with the explination of sketch code from the one You Tube Video. I think he does a really good job showing how to hook it all together. I'm pretty sure everything is hooked up correctly physically, but the sketch was what stopped my progress. Unfortunately, I don't have a good way to demonstrate the schematic. The joystick called out pins 3 and 5 for PWM on right motor controller, and 6 and 9 for the left. I'm going to do more research on exsiting code as Railroader suggested and see what I can find and learn.

I agree 100 percent. One missed line of code and your goose is cooked. Especially when you're a complete beginner like myself.

You're wellcome! Present any part code You like and what's bothering You. We support every step, small or large.

1 Like

That's promoted here! It's the soul of forum, help members learn and grow in programming!

1 Like

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.

Thanks.. Tom.. :smiley: :+1: :coffee: :australia: