I cannot load new programs on my Arduino Uno Clone Rev 3 using IDE 2.0 64 bit, windows 10 and Arduino Uno board ATmel 328p. It did work OK with my first tries of Blink.ino.
Have 3 simmilar boards, all do the same:
But I still do not know how to resolve it.
What happened a few days ago after my failures to get the 1602 Key Pad Shield working I decided to learn to troubleshot the C code and find out where exactly the break point was happening.
In the process I read and learn about writing code interlaced in certain lines or after certain statements that if I watched these feedback on the Laptop after loading the program would be for me a sure shot. It can be done by writing these short set of statements coding it to be sent to what is called in Arduino "The Serial Monitor" This uses the same COM port to tell me the message I coded in the program before that specific line.
Well, I modified a very simple program that I new for sure was working very well, called:Blink.ino.
It worked perfect and showed me exactly the program going on a loop writing back (after special delay() ) to give the hardware time to breath just in case since I am a beginner on this.
It worked OK, and still works with the 3 Arduino board Uno that I have.
So my opinion: The program is continuously looping and never stop. in the process keeps the COM port prisoner since I did not code any long delay and I do not know what statement to release the COM port or exit the loop or stop the program.
And I know the board is communicating with my laptop because is get in my Serial Port the:
Blink.ino
Blink.inot
....Blink.info
and will not stop until powered off...... so no other devise is keeping the COM port locked.
Is there any statement/function that one should use to release the COM port like in my case?
Is there any recipe to be able to stop the program i loaded in the board now so I can load other programs?
Really need help, I am a newbie at this, also age does not help.
Its not clear if you are going directly from the UNO to the laptop with your program running. Or if the Arduino IDE is involved. I would guess the former.
I also assume the COM port you are referring to is in your laptop.
As I understand it, the only way to lock a (USB) comport on your laptop is for a program running on your laptop to connect to it.
It worked OK, and still works with the 3 Arduino board Uno that I have.
So my opinion: The program is continuously looping and never stop.
All programs running on the UNO run continuously and never stop. It is the nature of how processors work. You can delay, put in an infinite while loop but the processor is still running.
So please clarify what COM port you are referring to, and how you determined it is "locked". i.e. what does it do or not do.
There should not be a need for that. What happens when you close the serial monitor in the IDE 2.0 and next try to upload?
Be aware that IDE2.0 is still beta and can have bugs like this (I vaguely seem to remember that this is one of them) or it might even be by design. If you want something that works, use IDE 1.8.x.
Thanks for your time and answer, I will check but I do not know how to close the Serial Monitor as I see will not make a difference because the COM is a receiver at that moment since the board is trying to send the text message as I intended,
Will try and report,
Thanks a lot, Wilson
Thanks John for your time and answer. I will tell as I understand, but no sure I understand correctly.
The sketch I wrote (and I cannot find it now) had some serial.print("blink.ino") preceded preceded by serial.begin(9600) and some delay(250) after sketch lines to prove to me that could be use for debugging.
When I compiles and loaded work well and came to my Serial Monitor as continued lines of Blink.ino That made me happy to learn a had a good tool in my opinion to debug.
But Wilson screws up often and this I think it was one. because unless by luck I manage to have the Arduino loader to reach the board while is in the void() or setup() prior to the declaration of serial.something function I am out of luck. I call that that the blink.ino I code-modify will keep that port open for itself unless there is a function/statement that closes it after serial print.
The COM I refer to is the COM that the USB (A&B) are used by IDE to program the ATmel328p.
Something else conspires against me and that is a personality problem, very disorganized (Cannot find the blink.ino I wrote) and being 83 years old brain plays tricks and loses concentration.
I will follow your suggestion using older IDE y no he beta. I think I did but not sure what the hell my computer is using
Again, thanks a lot for you help.
Wilson
Now I am not getting back to the serial monitor the "Blink.ino" I coded.
I think I need to give up, to old and too much time on this is frustrating me.
I had plans to progress with this and be able to code in C (Which I like very much) a program to run a "dividing head" ( a machine in a machine shop to cut gears).
I young man in Youtube (AndysMachines) built one controlling/synchronizing the spindle of the Milling Machine (with the gear cutter) and a dividing head that is controlled /advanced by a stepper motor to cut any number of teeth on a gear. Marvelous improvement for us old timers that use to do one tooth at the time and 30% errors running the dividing head manually.
Thanks, Wilson