Hi everyone,
I am having the same error pop up when I try to run a basic DC motor with an arduino nano and L298N motor driver. If I use my regular arduino it works fine in the same setup, it's only when using the nano and when I switch my program to recognize the nano. Please note that my I bought the arduino 5V nano so I would think it could work without a side power source? (See attached for error shown).
// Motor A
int enA = 9;
int in1 = 8;
int in2 = 7;
// Motor B
int enB = 3;
int in3 = 5;
int in4 = 4;
void setup() {
// put your setup code here, to run once:
pinMode(enA, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(enB, OUTPUT);
pinMode(in3, OUTPUT);
pinMode(in4, OUTPUT);
// Make motor A spin clockwise then stop
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
analogWrite(enA, 200);
delay (3000);
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
// Make motor B spin clockwise then stop
digitalWrite(in3, HIGH);
digitalWrite(in4, LOW);
analogWrite(enB, 200);
delay (3000);
digitalWrite(in3, LOW);
digitalWrite(in4, LOW);
}
void loop() {
// put your main code here, to run repeatedly:
}
Hi Gilshiltz, I've been following a youtube instruction video. It's exactly the same setup as this image beside the Uno being a Nano. Is this helpful? Or are you referring to something else?
Have you selected the correct COM for the Nano?
Usually if you have both controllers connected to the PC at the same time, they will have different COM port assignments.
Then it is not exactly the same. You do not show all the power and ground connections. The picture is pretty but not complete. A lot of people get in trouble powering hardware with the 5V output of the Arduinos. Try a seperate power supply and prove me wrong!
Thank you for your responses I believe your questions are on the right path as I found that my usb port is on COM 4, not COM 3 (see attached). Is there a way to change this recognition or how would I fix this?
Hey everyone,
I changed my COM port to 3 in my device manager but it still is showing the same error as above. Unsure if there is a secondary place I need to change it?
Thanks,
Evan
Morning Ruilviana,
I believe I have yes, the arduino Nano uses the ATmega328 and the processor is set for this. Do I need to install the driver information somewhere else?
Hi, @johannej1138
Yes, the arduino Nano has an Atemga328, but the interface of the Atmega328 with the USB is made through an FT232RL chip.
see the diagram in:
On the PC it is necessary to install the driver for this chip.
Sometimes this driver may be installed, but there is a problem.
When installing the Nano on your PC, go to the device manager of the operating system.
If it is marked with the yellow triangle, click on it and try to reinstall.
Evening Ruilviana,
Thank you for the insight. I have tried to uninstall and reinstall my port but I continue to get a yellow warning triangle next to my COM 3 port. I am unsure how to proceed.
You do not have the appropriate driver installed.
You have already been asked in post #10 to give the type of your USB-UART converter or a photo of both sides of your Nano board in post #17.
If you would like help, please give us detailed information.