Com port issues

I recently installed from zip version 2.3 .
All worked well to start with but …
In properties I set the sketch location to that of my old sketch folder , which also has a sub library folder .
But .. I have to reinstall the libraries when needed. Odd as when updating libraries it seems to find the right folder !
Anyway I put up with that , but it now will not upload consistently ; it finds the com port , then after compiling says the port is not available . It sometimes does this when compiling starts .
If I reboot the PC it has no effect.
1.8.9 is working fine .
Am I doing something wrong ?

Is the CH340 driver issue , or has that been fixed ???

Which board? In case of Nano, did you select the correct processor?

If serial monitor is open, close it and try again.

If you get a "Can't set com-state"error, see if Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM serial port - #49 by ptillisch solves the issue.

Please disable verbose output during compilation and enable verbose output during upload, perform an upload and post the results of a failed upload here.

I will do those things and get back to you .

Meanwhile problems were mainly on stand alone 328 chips used via a
FTDI /USB adapter which operated correctly under ver 1.8.

The 2.3 IDE would find the board ( I was using “UNO” settings after uploading the correct bootloader using ISPtiny ).
But then not be able to open it for upload.
All fine when using 1.8.9
As I said , I’ll fill in the details you mention , pos not today tho !
Thanks .

There is a known issue if you have the serial monitor open and using FTDI: "Access is denied" error when uploading to board w/ FT232 USB chip with Serial Monitor/Plotter open · Issue #1783 · arduino/arduino-ide · GitHub

Note that CH340 and FTDI are two different things.

1 Like

Ok I Can upload my sketch in 1.8.9 with this output:

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\house\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM8
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\house\AppData\Local\Temp\arduino_build_62395/model_t_pulse_speedo_v0.1.ino.hex"
avrdude: writing flash (20880 bytes):

Writing | ################################################## | 100% 7.85s

avrdude: 20880 bytes of flash written
avrdude: verifying flash memory against C:\Users\house\AppData\Local\Temp\arduino_build_62395/model_t_pulse_speedo_v0.1.ino.hex:
avrdude: load data flash data from input file C:\Users\house\AppData\Local\Temp\arduino_build_62395/model_t_pulse_speedo_v0.1.ino.hex:
avrdude: input file C:\Users\house\AppData\Local\Temp\arduino_build_62395/model_t_pulse_speedo_v0.1.ino.hex contains 20880 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 7.04s

avrdude: verifying ...
avrdude: 20880 bytes of flash verified

avrdude done.  Thank you.


On ver 2.3 I get this with the same code:

C:\Arduino projects\model_t_pulse_speedo_v0.1\Display.ino: In function 'void Display(byte)':
C:\Arduino projects\model_t_pulse_speedo_v0.1\Display.ino:5:7: warning: unused variable 'distance' [-Wunused-variable]
   int distance;
       ^~~~~~~~
C:\Arduino projects\model_t_pulse_speedo_v0.1\Temp_Calc.ino: In function 'void GetTemperature()':
C:\Arduino projects\model_t_pulse_speedo_v0.1\Temp_Calc.ino:10:7: warning: unused variable 'resolution' [-Wunused-variable]
   int resolution = 9; //9==0.5C
       ^~~~~~~~~~
C:\Arduino projects\model_t_pulse_speedo_v0.1\distance_speed.ino: In function 'void Speed_calc()':
C:\Arduino projects\model_t_pulse_speedo_v0.1\distance_speed.ino:18:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if ((millis() - Startmillis) >= CalcFrequency) // calc speed
       ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
C:\Users\house\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino\main.cpp: In function 'main':
C:\Arduino projects\model_t_pulse_speedo_v0.1\distance_speed.ino:38:18: warning: 'milesperHour' may be used uninitialized in this function [-Wmaybe-uninitialized]
     SpeedSteps = (int) milesperHour * Scale_factor;
                  ^
C:\Arduino projects\model_t_pulse_speedo_v0.1\distance_speed.ino:10:9: note: 'milesperHour' was declared here
   float milesperHour;
         ^
Sketch uses 20878 bytes (64%) of program storage space. Maximum is 32256 bytes.
Global variables use 594 bytes (29%) of dynamic memory, leaving 1454 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\house\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\house\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v  -patmega328p -carduino "-PCOM8" -b115200 -D "-Uflash:w:C:\Users\house\AppData\Local\Temp\arduino\sketches\F66B714E6107AA938671ADF8330C5EE2/model_t_pulse_speedo_v0.1.ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\house\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM8
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: ser_open(): can't open device "\\.\COM8": Access is denied.



avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

I seems to be code related, as 2.3 will still upload a blank sketch .

FIxed it !!

It was that the Serial monitor that was active - My unfamilarity with 2.3 I hadn't picked up that the tab in the lower screen was active !

Apologies for any time time wasted. I appreciate you trying to help.

You did not waste my time because you learned something :wink:

1 Like