Error opening serial port 'COM4'. (Port busy)

Hello Everyone,

I am running a software on my Arduino Mega 2560. I connected to COM 4 which is the only option for me to use. I upload the code and it says:

Done uploading:

Sketch uses 43136 bytes (16%) of program storage space. Maximum is 253952 bytes.

Global variables use 3935 bytes (48%) of dynamic memory, leaving 4257 bytes for local variables.

Maximum is 8192 bytes.

Error opening serial port 'COM4'. (Port busy)

PLZ help!

Thanks!

Adam Youssef

(deleted)

I'm not really sure if that is going to solve the problem, but I will try anyways.

(deleted)

Well, I didn't really try much to be honest. I unplugged the power supply from the outlet and unscrewed it from the motorshield, and the software worked. (It didn't really work because I need the power supply to power my motors and servo.) But then the second I put the power supply back in the motorshield and connect it to the outlet, Bam, the software doesn't work. I will try to restart my computer and I will also make sure that the AC Adapter and the charging port for the computer are connected to the same outlet.

(deleted)

...or if you have a 3rd party program on the COM4 serial port (PuTTy etc), that will occupy the port if it is open.

OK, so this is what's going on so far.

Connected the Arduino to the USB cable and ran the software: Worked

Connected the Motorshield to the Arduino to the USB cable and ran the software: Worked

Connected the power supply to the Motorshield to the Arduino to the USB cable: Didn't work.

This is the error I got:

Sketch uses 43136 bytes (16%) of program storage space. Maximum is 253952 bytes.
Global variables use 3935 bytes (48%) of dynamic memory, leaving 4257 bytes for local variables. Maximum is 8192 bytes.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
An error occurred while uploading the sketch

I restarted my computer, I tried the software many times. Still got the error. Should I include any libraries with the software? Don't know what to do!?!?!?!?!? Please help! Thanks!

Adam Youssef

Hi,

Connected the power supply to the Motorshield to the Arduino to the USB cable: Didn't work

What model Motorshield, post link to spec/data please.

Does the Motorshield have a jumper for motor power?

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

Can you please post a picture of your project so we can see your component layout?

Thanks.. Tom.. :slight_smile:

TomGeorge,

This is the link from where I bought the motorshield:

I'm not sure if the Motorshield has a jumper for motor power. How would I find that out?

So this is my design for my project:

A 4ft by 2ft piece of wood. On both ends of that piece of wood are two NEMA 17 stepper motors. They are striped and connected to the Motorshield which is connected to the arduino mega 2560. I have a pen holder that has a servo attached to it. The servo cable is also attached to the motorshield. The Makelangelo works by moving the stepper motors back and forth line by line to create a drawing. Is that the info you need? Thanks Tom!

Adam Youssef

I think we're still stuck at "please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?"

A circuit diagram or 'schematic' draws out all the separate wires and connections between every element of your project. Stock photos don't cut it, as we need to see how you have implemented the pieces of the puzzle

Hi,
What size power supply are you connecting for the motors.

Your motor shield will have a jumper on it, marked EXT or PWR

If you are using external power for the shield, this jumper should be removed, to stop the external power form feeding to the Arduino Vin pin and DC socket.

Tom... :slight_smile:

TomGeogre,

I'm using AC-DC Adapter.
Brand: Elegoo
Input: 100-240V AC 50/60 Hz
Output: 9V DC 1A

My motorshield does have a jumper labeled PWR

And how would I remove the jumper since I am using an external power supply

Thanks Tom!

Adam Youssef

Lastchancename,

This is the hand drawn sketch of my Makelangelo:

Lastchancename,

The picture couldn't upload because the file was too large. How should I get it to upload?

Hi,
Use a graphic program like Paint and resize it.

My motorshield does have a jumper labeled PWR

And how would I remove the jumper since I am using an external power supply

You remove the jumper by pulling it off the pins that it connects, you leave the two pins open circuit.

Tom.... :slight_smile:

Here is the sketch I made for my Makelangelo.

MAKELANGELO.jpg

TomGeorge,

Do you know if I could use COM 4 in two locations at once, or could one single COM not be able to do that?

Thanks!

Each COM port can only be opened by a single Windows app - unless it is specifically designed to arbitrate between programs (very rare)

The pencil drawing says a lot about your approach.
We're spending time to help, but the scrawl you posted isn't worth looking at.
How about spending 15 minutes to respect us and yourself.