I am trying to use lillypad USB with an atmega chip and anytime when I try to upload the code to lillypad I get the same error message says that;
avrdude: ser_open(): can't open device "\.\COM4":The system cannot find the specified file(There is a sentence in Turkish but if I must translate it wil be something like that)
Failed uploading: uploading error: exit status 1
I tried to restart pc, delete the port,I included the servo library, I selected the right port and card but it did not work.
`#include <Servo.h>
#define BUTTON_PIN 10
#define BUTTON_PIN1 11
Servo myservo;
Servo servom;
void setup() {
pinMode(BUTTON_PIN, INPUT);
myservo.attach(3);
servom.attach(2);
// set servo to mid-point
}
void loop() {
if (digitalRead(BUTTON_PIN) == HIGH) {
myservo.write(0);
delay(50);
servom.write(180);
} else if (digitalRead(BUTTON_PIN1) == HIGH) {
myservo.write(180);
servom.write(0);
}
}`
And also maybe one of the most basic codes, the blink code from File>>Examples>>Basics didn't work and I got the same Error
Hi @mert_eren. From the "not connected" in the status bar, I can tell that the serial port you had selected from Arduino IDE's Tools > Port menu is no longer present on your system:
It might be that the board's serial port now has a number other than COM4. If so, the solution will be to select the correct port.
Please try this:
- Connect the Arduino board to your computer with a USB cable (if it is not already).
- Select Tools > Port from the Arduino IDE menus. If one of the ports in the menu is labeled with the board name (e.g., "COM42 (Arduino Uno)"), that is the port of your Arduino board.
If you saw the port labeled with the board name in the Tools > Port menu, select that port and try uploading again.
If this doesn't solve the problem, please reply here on this forum thread with the answers to the following questions:
- While following those instructions, did you see a port in the Tools > Port menu that was labeled with the board name?
- If you did see a labeled port, was the upload successful after you selected that port?
Nah bro i took the screenshot when card is not inserted. I should add another photo
There is the photo