Hi all
It has been 2 days since I baught my Arduino Uno and until yesterday i tested several things like blinking and fading an LED and it all worked fine. But yesterday when i was following a tutorial involving with a coding as follows i couldn't upload any more sketch to the board.
int sensePin = 0;
void setup(){
analogReference(DEFAULT);
Serial.begin(9600);
}
void loop(){
Serial.println(analogRead(sensePin));
delay(500);
}
When i first compiled and uploaded this code i was expecting the serial monitor window would come up as it did in the tutorial video but nothing came up. So i tried compiling and uploading it again. Then it gave an error as
processing.app.SerialException: Serial port 'COM29' already in use. Try quiting any programs that may be using it.
at processing.app.Serial.<init>(Serial.java:171)
at processing.app.Serial.<init>(Serial.java:77)
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:77)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:175)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:619)
processing.app.debug.RunnerException: Serial port 'COM29' already in use. Try quiting any programs that may be using it.
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:101)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:175)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:619)
and since then, every time i try uploading a code this error comes. I tried several things on the internet but none of them worked.
Additionally earlier before this error came, when i plugged in the board to the pc, the green LED lights up and the yellow LED connected to pin 13 would keep on blinking forever unless I upload any sketches.
But after this problem happened, once I connect the board to the pc the green led lights up as before but the pin13 LED stays lighted up forever and the led shown in the attached pic(as I think, the one connected to the pin TX) would keep on blinking about twice every second forever.
Could the board be running the last code i uploaded to it(mentioned before) every time I connect it to my PC and since it involves sending data to the PC the port becomes unavailable?
If so would clearing and reprogramming the chip using another arduino would fix the problem? or is there any other simpler way?
One more thing
today I noticed that when I turn the PC on, connect the arduino uno and try uploading a sketch for the first time, an error as follows is coming and from there on every time i try uploading it the previous error is coming.
processing.app.SerialException: Error opening serial port 'COM29'.
at processing.app.Serial.<init>(Serial.java:178)
at processing.app.Serial.<init>(Serial.java:77)
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:77)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:175)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:619)
Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter
at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:171)
at processing.app.Serial.<init>(Serial.java:163)
... 9 more
processing.app.debug.RunnerException: Error opening serial port 'COM29'.
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:101)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:175)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:619)
When connected the board appears with the name of the com port in the device manager so there it doesn't seem to have a problem. But however when i plug this board to another pc which doesnot have arduino Uno drivers installed before, after installing the drivers, the device properties window says this device cannot start.
Can anyone please help me?