Arduino is not able to run any sketches - arduino

recently I started using my arduino again, but it can no longer run sketches or anything. All I get is this error:
processing.app.debug.RunnerException at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:152)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
at processing.app.SketchController.upload(SketchController.java:732)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$UploadHandler.run(Editor.java:2047)
at java.lang.Thread.run(Thread.java:748)
Caused by: processing.app.SerialException: Error touching serial port 'COM4'.
at processing.app.Serial.touchForCDCReset(Serial.java:107)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:136)
... 5 more
Caused by: jssc.SerialPortException: Port name - COM4; Method name - openPort(); Exception type - Port busy.
at jssc.SerialPort.openPort(SerialPort.java:164)
at processing.app.Serial.touchForCDCReset(Serial.java:101)
... 6 more
I tried restarting pc, using different port, stopping other devices in device manager from using the port, reinstalling the IDE, and more.
nothing works.
It cant even run blink without throwing this error.
I am using windows 10 pc, Arduino MKR WIFI 1010 , with a usb 3.0 cable, the Arduino used to work too.
none of the other answers on the internet has worked for me.
could this be a problem? ->
EDIT: I figured out what was wrong. the cable I was connecting to my arduino and computer was ONLY a charging cable, it had no ability to send serial data across to the arduino

this can happen if you have other stuff connected to your arduino that sends or receives data, like a bluetooth module.
Try disconnecting everything from the board and resetting the board, then connect the usb to your arduino

The issue was I was using the wrong type of cable for connecting my arduino to computer

Related

ESP32,ESP8266, AND ESP8266 NODE MCU not working

1.I started with esp. 32 i used arduino IDE it only showed COM1 in PORTS. when i was uploading the code i pressed the boot button when connecting..... appears in the window but still an error (timeout....) occurs and code doesn't upload.
i installed the drivers but whenever i plugged in the usb cable a notification pops up that the computer doesn't recognize the device. i installed ch341 but it says the the drivers are preinstalled.
same problem appear with esp8266 node mcu.
Then using the same cable I started working with esp8266 no error popped up it had two options in PORT COM1 and COM4 I choose COM4 and I uploaded the blink code. it worked fine but after that i upload the WIFI SCAN code it started showing same problem as esp32... i disconnected it and connected again error popped up that it doesn't recognized by computer. and furthermore now it only shows com1 in ports option and when I press flash button the code doesn't get uploaded it shows timed out error. i disconnected and connected many times but it doesn't working.
are you setting like this??
this is my setting on the arduino
I mean you can try to install the esp32 USB port library CP210x_Universal_Windows_Driver.exe.
if your system does not detect esp8266 or NodeMCU boards while you installed all possible drivers, as mentioned in this GitHub issue change your USB wire cause the wire maybe is for just charging and not transferring data!
changing it worked for me!

Serial port communication not working via .net 5 for Marlin board

I am trying to get a simple Serial Port connection between dotnet 5 and a Marlin based printer board which is running some variant of a micro controller (LPC1768FBD100 https://www.arrow.com/en/products/lpc1768fbd100551/nxp-semiconductors).
I can open a connection to the board using other tools, send a "M503\n" command and receive a response, the tools I've used successfully are
Pronterface (Windows)
Arduino Serial Monitor (Windows)
miniterm (Linux)
putty (Windows)
So I know the board to be functioning correct in both Linux and Windows, but when attempting from .net, I am yet to succeed in getting any response back from the board. I have uploaded a simple tool in .net 5 that connects to a serial port and allows you to TX / RX strings,
https://github.com/devoctomy/SerialPortTester
I have tested this code in Windows and Linux, same port settings, no response back. I have also tested this exact code against a simple echo program running on an Arduino Uno board and it all works as expected, but for the life of me I can't get anything back from the other board.
I'm wondering if there's something about serial comms that these other apps are doing that I just don't know about. I'm using the same port settings which are shown in device manager across the board when testing in Windows, and also the same settings when testing in Linux.
In Linux the board comes up as ttyACM0, which is how my Arduino Uno is also mounted.
Any suggestions? I'm sure this isn't a "Marlin" issue, as only one of the other tools I've tested with is specific for Marlin and the Arduino serial monitor is about as basic as you can get. There's something I'm not doing in the .net code I think...
I've also tried someone elses old .net code and it also doesn't get a response back from this board, but does from my Arduino Uno running the echo program.
https://www.codeproject.com/Articles/23656/Termie-A-Simple-RS232-Terminal
Nick.
Edit:
I'm currently looking to see if it's just .net and the underlying mechanisms that is effected here and have found this page,
https://www.sparxeng.com/blog/software/must-use-net-system-io-ports-serialport
I've modified my tester code to access to base stream for sending / receiving data just in-case, but this has not fixed the issue.
Okay I got it, I knew I was missing something,
port.DtrEnable = true;
This fixes it and now I'm receiving and sending data to the Marlin board.

Arduino micro not recognized

Today I have an Arduino micro for some time and everything always worked well. Today, when I was uploading a code on this board using Arduino IDE, I accidentally started the Arduino Board update and the upload failed. After a while I retried again and again and again but upload always failed. Now my PC doesn't recognize my board and, looking in "device manager", when I connect my board, appears this screen. What should I do? Have I to reflash bootloader? Thank you!
I used to have same thing but i figured out my cable was not original so i used samsung micro then windows saw my arduino on SERIAL PORT, COM5.Everythin is working correct now, all errors about cable go change the cable.

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:
Changing the COM port
Disabling all the other devices CONNECTED to COM
Tightening the CONNECTIONS
Re installing all the drivers and the IDE
Rebooting the system
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?
this may help;
remove the mcu from the board and connect the board to your PC.
try to open the com port.
if it opens, short TX pin to RX pin.
send some data and check if you are getting the data back. this way you can make sure your usb-ttl is not damaged.
With my verry limited experience with Arduino I've seen that the IDE sometimes resets the saved arduino on startup. Press extra -> Board -> yourboard and try again.
make sure you have the right ports COM1 and COM1
activate it too in arduino
Once it happened to me that a defective USB cable was the culprit. For one board it gave messages like
avrdude: stk500v2_ReceiveMessage(): timeout
But for another board I also got these messages "can't open device - access denied". It's always worth to try another cable.

Freeduino v0.1 avrdude: stk500_getsync(): not in sync: resp=0x00

I have a freeduino board, v0.1. ATMega 328
I am running Windows 8 and trying to run the 'Blink' program
Arduino 1.0.5 Software
I have chosen Arduino Uno as board type
My Serial port is COM3
When I try to upload a program I get the error
avrdude: stk500_getsync(): not in sync: resp=0x00
I have disabled bluetooth as well.
Please let me know if my board selection is correct
As far as I know the "freeduino board, v0.1. ATMega 328" doesn't equal the "Arduino Uno", but the "Arduino Duemilanowe w/ Atmega 328". So, go to Tools and select "Arduino Duemilanowe w/ Atmega 328".
http://forum.arduino.cc/index.php?topic=201710.msg1486452#msg1486452
Another reason it might fail is because your driver wasn't installed correctly. In this case reinstall your driver.
Freeduino should run with Uno setup. However if your controller does not have a bootloader, if you serial connection is wrong or if the controller is not running at all you will get the same error.
I have gotten this error when the COMn port is not available or defined. A com port can become not effective when you just unplug the board/USB cable.
When you re-plug the USB cable into the PC, then in the Arduino IDE define the correct port and try compiling/reloading the program.
On my Windows/XP Pro machine, the Arduino uses COM5, but lists COM4 and COM5 as available choices.
Hope this helps.
I had the same error. My board was working all perfectly without any error and suddenly it threw this error. After much testing, I unplug the board from the USB port and plugged into another USB port (in the PC) and it all worked perfectly !
Of course that required changing the Serial Port number from Arduino -> Tools > Serial Port
My board is working perfectly now.
I have had the same error, nothing worked. Tried almost every option mentioned.
But the solution for me was simple. I have Windows 7 64-bit.
First remove all drivers and everything wat looks likes al (virtual) USB to COM port driver.
Reboot (its Windows)
Install the right drivers from the Arduino IDE drivers\ map, in my case the 64-bit drivers.
Go to site for the FTDI Chip drivees make the right choice for your OS and install.
Reboot (not asked but he its Windows)
Then I connected the Arduino en tried to upload the Blink-sketch.
And everything worked as expected.
I had the same error so i change the serial port to COM1 to COM4, and I am using windows 7
so go to tool->serial port->change COM1 to COM4
If that didnt worked try to change board from Arduino uno to Duemilanove.
Hope this help you.....

Resources