hello im trying to make a autonomous vehicle and i have a nrf24lo1 and a motor shield for an arduino uno its an l293n I need help knowing which pins go where. I also need to know the code too. For the remote I got a Uno and a joystick shield and another nrf24lo1. The joystick shield already has a port for the nrf24lo1, so theres no wiring needed. I also need the code for the remote too. Any help I get is good. Im new at this so I don't have much experience.

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Can you tell us your electronics, programming, Arduino, hardware experience?

Have you tried to write any code?

We do not write code for you, we will advise and help trouble shoot your code, but not write it all for you?

Thanks.. Tom... :)

Have a look at these links

Simple nRF24L01+ Tutorial Planning and Implementing a Program


Hello I have not done any coding

actually you now what I can use a l298n instead of having a shield but thanks for help

Hello im a making a arduino car that has a tank drive, so a motor on each side. I got everything hooked up and ready for programming. I need help on where to start on the code part. For the wiring Im almost sure this is correct but I want your opinion. L298N input 1 is pin 2. In2 is pin 3. In3 is pin 4. And In4 is on pin 5. I didnt use enable a or b. For the Nrf24l01, Vcc 3.3v. Gnd Gnd. CE pin 7. CSN pin 8. Mosi pin 11. SCK pin 13. And Miso pin 12. IRQ not connected. And I have 4aa powering it. The remote is just a joystick shield with a nrf24l01. Both arduino unos. I just need somewhere to start the code because this is my first time.

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.,148850.0.html

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Tom... :)

Threads merged.

this is what I made i also have power to arduino threw a cord. The remote is very basic just a joystick shield and a nrf24l01 that plugs in.

Where is the common ground connection for the motor driver?

cden: scroll down

What is the purpose of this? Why have you deleted your Original Post?


EDIT seems like @CodingBadly has kindly reinstated the text of the Original Post

cden: scroll down

The ban is permanent if you vandalize the forum again.

OPs diagram.
Yes missing gnd from motor controller to UNO.

Tom… :slight_smile:

There are two supplies for the L298N

+Vs which is the Motor Power Supply
+Vss which is the L298N logic circuit 5V Power Supply
Gnd of the motor power supply is connected to both gnd of the Uno and gnd of the L298N .

If you google Arduino programming tutorial
you will find all sorts of coding instructions.

When you code for this project you need to do it in stages.

First connect the L298N to the UNo and Motor Power Supply.
Using some buttons and a potentiometer get the motor control code working.

Second, using Serial Monitor in the IDE, code so that you can use keyboard commands to control your motors.
Get that working.

Third, with only the nRF connected, write code JUST for the nRF an the Serial Monitor so you can get the nRF connection to the joystick working properly.

Then and only then begin to combine the codes, ONE at a time and get the combination working BEFORE adding the next section of code.

The key is never add non working buggy code to already working main code.
When you combine you will almost certainly get errors and bugs, but you know that the codes you are using are bug free and that it will be an integration problem.

I know it sounds a long a laborious procedure, but I can guarantee, you will learn more, faster, and have less frustrating problems if you itemize and structure your coding.

Just nRF coding is a steep learning curve, but you will realise all the things it can do to enhance your project.

Can you post a link to data/specs of the joystick/nRF combination please.

Thanks… Tom… :slight_smile:

Thanks Tom. This helped a lot. I will do these steps.

Ok, so I got the code and uploaded them, but when I move the joystick only one motor works. On the serial monitor It reads the X and the Y axis, I think it might be a bad l298n. (2 KB)


Have you had the motor driver working correctly at all?

Have you got some code that just drives the motors to prove your motor driver connections?

This looks like a project that needs to be written in stages, and you should have JUST code to make the motors cycle through their movement, without any remote coding in it.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png? Not a fritzy picture.

Thanks.. Tom.. :)

Heres this, tell me if you need something better. :slight_smile:

Hi, Have you got any code that JUST controls the motors, that is just mkes them cycle up and down in speed and direction?

Have you proved before adding the RC stuff, that you have control of your motors?

Tom... :)