error occurred when I tried to upload.

I am using Arduino Uno and mega2560.
And This was my first try with arduino.

when I was trying to work out with basic blink example with a LED I could see more options for serial port.

but after I tried to follow a example from library with a stepper motor and external power supplier, I couldn't see any other option apart from ttv bluetooth options.
and with that bluetooth option, i cannot upload anymore. error messege(like in the picture) keep coming up.

Why it's happened? do I have to buy new one?

The Arduino IDE talks to the Arduino board using a serial port that you select within the IDE. It will only work properly if you select the virtual port provided by the Arduino USB drivers when you plug the Arduino in. Although your system may offer the choice of other COM ports (like the virtual one associated with your bluetooth driver) that won't connect to your Arduino board so will not work. Only the Arduino's virtual serial port will work.

It sounds as if your system no longer shows that. Perhaps something has gone wrong with your Arduino USB drivers. Have you tried disconnecting and reconnecting the Arduino board? If that doesn't work, you could try rebooting.

Hi ksshhs,

Don't flame me for pointing out the obvious but I assume your also changing the board type in the Tools/Board dropdown menu