Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to upload code to Arduino

My Arduino Uno was all set up and was working fine.

Project: Arduino controls a 9v motor depending on the command given. As the Arduino only provides 5v, I added a 9v battery to it through a transistor

I decided to add new code into the Arduino but when I tried it failed. I have uploaded code thousands of times before (successfully) all of a sudden the IDE keeps giving the following message

avrdude: ser_open(): can't open device ".\COM3": Access is denied.

I have looked up for a lot of solutions on this forum and elsewhere. Here are the things I have tried so far:

  1. Changing the COM port
  2. Disabling all the other devices CONNECTED to COM
  3. Tightening the CONNECTIONS
  4. Re installing all the drivers and the IDE
  5. Rebooting the system
  6. Using another laptop to upload code

All the above have given me the same output for some reason. The built in LED light and the power LED switch on when the board is connected to a power source (my laptop). Could the board have been damaged by any chance? How can I check if the board is spoilt? Should I buy a new board?

like image 914
m0bi5 Avatar asked Apr 11 '15 03:04

m0bi5


1 Answers

this may help;

  1. remove the mcu from the board and connect the board to your PC.
  2. try to open the com port.
  3. if it opens, short TX pin to RX pin.
  4. send some data and check if you are getting the data back. this way you can make sure your usb-ttl is not damaged.
like image 145
GnoStiC Avatar answered Dec 28 '22 11:12

GnoStiC