Trying to get ARDUINO prog to work

KeithWalker

Joined Jul 10, 2017
1,222
Do your motors work? Are they connected the right way to the correct outputs? Are you using a separate power supply to drive the motors? Do you have the power jumpers set correctly on the motor shield?
What have you checked so far and what does work?
 

Thread Starter

beatsal

Joined Jan 21, 2018
169
Thanks for the useful replies. Now the Arduino when switched on has a green lite and 2 amber lites on, so think it is OK, but when I upload a program, get the foll. error. It seems to be stuck at COM4, can`t change the com no.

Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Uno"

Sketch uses 806 bytes (2%) of program storage space. Maximum is 32256 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

An error occurred while uploading the sketch

avrdude: ser_open(): can't open device "\\.\COM6": The system cannot find the file specified.






This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
 

Thread Starter

beatsal

Joined Jan 21, 2018
169
I now checked COM4 but get:

Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Uno"

Sketch uses 806 bytes (2%) of program storage space. Maximum is 32256 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x30

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x20

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x30

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x20

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x30

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x20

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x30

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x20

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x30

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x20

An error occurred while uploading the sketch



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
 

djsfantasi

Joined Apr 11, 2010
6,811
And you are using the Arduino IDE? You need to find the “Ports” option in the menu drop down. Click on it and see which port is selected. Other ports will be listed and the active port (COM4, COM6 or another one) MUST be selected.

Check the Help option for assistance in setting the correct port. Oftentimes, unplugging the Arduino and closing ALL instances of the IDE will help. Then plug in the Arduino before starting the IDE, and the correct port will appear in the drop-down.
 

Thread Starter

beatsal

Joined Jan 21, 2018
169
And you are using the Arduino IDE? You need to find the “Ports” option in the menu drop down. Click on it and see which port is selected. Other ports will be listed and the active port (COM4, COM6 or another one) MUST be selected.

Check the Help option for assistance in setting the correct port. Oftentimes, unplugging the Arduino and closing ALL instances of the IDE will help. Then plug in the Arduino before starting the IDE, and the correct port will appear in the drop-down.
Yes tried that, still get COM4 only. I have another Arduino and it shows COM4, COM6. Wonder if this one has failed. Any way of telling from error msg. The green and Amber lites come on OK.
And you are using the Arduino IDE? You need to find the “Ports” option in the menu drop down. Click on it and see which port is selected. Other ports will be listed and the active port (COM4, COM6 or another one) MUST be selected.

Check the Help option for assistance in setting the correct port. Oftentimes, unplugging the Arduino and closing ALL instances of the IDE will help. Then plug in the Arduino before starting the IDE, and the correct port will appear in the drop-down.
I have 2 Arduinos, 1 has a green and amber light when plugged in, the other has a green and 3 amber lights (1 RX, 1TX) that light when plugged in. Not sure why this difference
 

djsfantasi

Joined Apr 11, 2010
6,811
Do you only have one Arduino connected via USB at a time?

If you only have Com4 showing, that’s where the Arduino is connected.
 

djsfantasi

Joined Apr 11, 2010
6,811
The only other thing is perhaps your preferences are incorrect. Avrdude should pull the port from the IDE. If it’s not, a preference could be overriding the port.
 

KeithWalker

Joined Jul 10, 2017
1,222
The number of leds lit on your Arduino will depend on what software has been loaded into it. I doubt whether anything is wrong with your two Unos.
You need to verify which serial port your uno is using and then enter that into the ide.
In Windows 10, Right-click the Start menu button and select Device Manager. With the Device manager open, connect the USB cable from the Uno to your computer. You will see a new line appear in the menu, Ports (COM & LPT). click on the little triangle next to it and you will see "Arduino Uno (COMx)" the "x" is the number of the COM port.
You then need to enter the device and port into the Arduino program ide that you are going to load . Select "Tools", then "Board" and click on "Arduino Uno" in the drop down menu. Then sect "Tools" again and select "Port", Click on the port in the drop down menu that your Uno is using.
When you have done that, the Arduino type and COM port number will be shown in the bottom green border in the ide. Then download the program.
 

Thread Starter

beatsal

Joined Jan 21, 2018
169
The number of leds lit on your Arduino will depend on what software has been loaded into it. I doubt whether anything is wrong with your two Unos.
You need to verify which serial port your uno is using and then enter that into the ide.
In Windows 10, Right-click the Start menu button and select Device Manager. With the Device manager open, connect the USB cable from the Uno to your computer. You will see a new line appear in the menu, Ports (COM & LPT). click on the little triangle next to it and you will see "Arduino Uno (COMx)" the "x" is the number of the COM port.
You then need to enter the device and port into the Arduino program ide that you are going to load . Select "Tools", then "Board" and click on "Arduino Uno" in the drop down menu. Then sect "Tools" again and select "Port", Click on the port in the drop down menu that your Uno is using.
When you have done that, the Arduino type and COM port number will be shown in the bottom green border in the ide. Then download the program.
Tried, only shows LPT no Arduino when USB cable is connected. Looks like for some reason, it does not recognize that Arduino is connected. Also, both the TX, RX LEDs are lit which is not the case with my other Arduino.
 

djsfantasi

Joined Apr 11, 2010
6,811
Do you have other Arduino USB cables? I’d try them as well.

Your laptop is not recognizing the USB cables. Did you install the current drivers? Have you uninstalled the Arduino IDE and then installed the current version?
 

KeithWalker

Joined Jul 10, 2017
1,222
If your laptop recognizes one Uno but not the other, the bootloader on the bad one is probably corrupt. It can be re-loaded.
If your laptop will not recognize either of your Unos, you will probably have to un-install the Arduino ide and re-install it to get the drivers working..
 

djsfantasi

Joined Apr 11, 2010
6,811
Thanks. Not sure how to uninstall and reinstall IDE
Enter “uninstall program” in the Win10 search bar, read about uninstalling programs and follow the instructions.

Go to “Arduino.cc” in a browser and follow the instructions on the web site for downloading and installing the IDE
 
Top