Error code, can't figure it out

I'm trying to uploud my sketch on my Arduino MKR1000 but it won't work.
This is my code:

int red = 10;
int yellow = 9;
int green = 8;

void setup(){
pinMode(red, OUTPUT);
pinMode(yellow, OUTPUT);
pinMode(green, OUTPUT);

void loop(){
digitalWrite(green, LOW);
digitalWrite(yellow, HIGH);

// turn off yellow, then turn red on for 5 seconds
digitalWrite(yellow, LOW);
digitalWrite(red, HIGH);

// red and yellow on for 2 seconds (red is already on though)
digitalWrite(yellow, HIGH);

// turn off red and yellow, then turn on green
digitalWrite(yellow, LOW);
digitalWrite(red, LOW);
digitalWrite(green, HIGH);

This is the error code:

De schets gebruikt 9208 bytes (3%) programma-opslagruimte. Maximum is 262144 bytes.
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(
at cc.arduino.UploaderUtils.upload(
Caused by: Fout bij het aanspreken van de seriƫle poort "COM4"
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(
... 5 more
Caused by: jssc.SerialPortException: Port name - COM4; Method name - openPort(); Exception type - Port busy.
at jssc.SerialPort.openPort(
... 6 more

Plz help... :frowning:

Don't mind the double pic :stuck_out_tongue:
but this is how my setup looks like

(ps if someone knows a better way to attache my cables onto my arduino, you can always let me know)

Please edit you post to have the code and the error in (two separate) code tags. See How to use the forum.

Second, of all the boards you thought this was the right one??? [update]Fixed by mod[/update]

The error tells you the serial port is somehow busy. The error probably ends in something like "Error opening serial port 'COM4'. (Port busy")" but you didn't copy the full error (hence the "6 more" at the bottom).

Reconnected it? Is it the right COM port?

Can't help you any more with it because of the lack of experience with the MKR1000.

(ps if someone knows a better way to attache my cables onto my arduino, you can always let me know)

Or course, get a soldering iron!

I'v tried both allready, but it still won't work :frowning:
I also don't know how to copy the full error code (complete noob)

But if I use a soldering iron i can't make it loose again or can I?

When it reports that a serial port is busy, that usually means another program on your computer is using the port. Identify and close that program. Reboot the system if needed.

Sometimes, software meant to interact with some specific serial device will automatically glom onto any serial port you connect and try to talk to it as if it's whatever device the software was meant to work with.