Problem for uploading my code

In IDE>Tools>Board: is Arduino UNO
IDE>Tools>Port: is COM7
And i am using a Arduino UNO (not from official shop)
I just wrote a simple code and when i want to upload the code, this error comes up:
avrdude: ser_open(): can't set com-state for "\.\COM7"
Failed uploading: uploading error: exit status 1

Any solution?

search for appropriate driver

It does work on my older computer, But in the newer one it doesn't.
(my older computer is windows10 and this new one is 11)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.