Go Down

Topic: help (Read 832 times) previous topic - next topic

cden

Jan 09, 2018, 02:06 am Last Edit: Jan 13, 2018, 08:31 pm by Coding Badly
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.

TomGeorge

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,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... :)
Everything runs on smoke, let the smoke out, it stops running....

Robin2

Two or three hours spent thinking and reading documentation solves most programming problems.

cden

Hello I have not done any coding

cden

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

cden

#5
Jan 13, 2018, 12:18 am Last Edit: Jan 13, 2018, 04:48 pm by cden
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.

TomGeorge

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,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... :)
Everything runs on smoke, let the smoke out, it stops running....

Coding Badly


Threads merged.


cden

#8
Jan 13, 2018, 04:52 pm Last Edit: Jan 13, 2018, 04:59 pm by cden
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.

aarg

Where is the common ground connection for the motor driver?
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

Robin2

#10
Jan 13, 2018, 06:02 pm Last Edit: Jan 14, 2018, 10:39 am by Robin2
scroll down
What is the purpose of this?

Why have you deleted your Original Post?


...R

EDIT seems like @CodingBadly has kindly reinstated the text of the Original Post
Two or three hours spent thinking and reading documentation solves most programming problems.

Coding Badly

scroll down
The ban is permanent if you vandalize the forum again.


TomGeorge

Hi,
OPs diagram.

Yes missing gnd from motor controller to UNO.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

TomGeorge

#13
Jan 14, 2018, 01:49 am Last Edit: Jan 14, 2018, 02:03 am by TomGeorge
Hi,
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.. :)

Everything runs on smoke, let the smoke out, it stops running....

cden

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

Go Up