Motor Shield and Joystick Connection

Hi, im currently building a remote control car and i want to use a joystick to control it. Currently i have 4 motors hooked up to a motor shield. I want when the X on the controller is moved, the car turns that way. I then also want when the Y changed, to increase and decrease motor speed. How could i do that. Im also using an NRF transmitter but that isnt what i need help with. So basically just X changes the direction of the motors and Y changed the speed.

If you want some help you will need to be a little bit more specific.

Read this before posting ...

What are your motors doing? Driving the wheel? Opening windows? Sunroof? :slight_smile:
What type of motors are they?
Do you have parts of the code that is already working? e.g. spinning the motors
Can you provide links to data sheets?
Which Arduino board are you using?
What libraries?

If it’s remote control presumably the joystick is connected to the “NRF transmitter” that you don’t need help with. So what EXACTLY is it sending to the receiver in the car? And have you already checked that whatever it is sending is being received correctly. There are many ways of sending data, some a lot more reliable than others.

Posting your existing code for both transmitter and receiver would help answer most of those questions.

And then there’s what type of car it is with what motors and motor driver (there are thousands of possibilities). But in general turning is done either with a servo turning the front wheels (if it has 4 wheels) or with differential power to the wheels on different sides. Speed control is done with PWM to the motors unless they are brushless motors in which case it’s probably servo-type signals to the ESC.

Do you see why more information is needed?

Steve