Exit status 1 problem

Hi, I am having some difficulties with uploading my code. When I try to upload my code to my Arduino uno it says something about exit status 1, this is the code I’m using:

#include <IRremote.h>

IRsend irsend;

const int b1 = 4; //on off
const int b2 = 5; //Vol +
const int b3 = 6; //vol -
const int b4 = 7; //HDMI

void setup() {
pinMode(LED_BUILTIN, OUTPUT);
pinMode(b1, INPUT);
pinMode(b2, INPUT);
pinMode(b3, INPUT);
pinMode(b4, INPUT);
}

void loop() {
if (digitalRead(b1) == HIGH) {
delay(50);
irsend.sendNEC(3772793023, 32);
}

if (digitalRead(b2) == HIGH) {
delay(50);
irsend.sendNEC(16585453, 32);
}

if (digitalRead(b3) == HIGH) {
delay(50);
irsend.sendNEC(16618093, 32);
}

if (digitalRead(b4) == HIGH) {
delay(50);
irsend.sendNEC(16644103, 32);
}

delay(1);

}

}

Please do this:

  • When you encounter an error, you'll see a button on the right side of the orange bar "Copy error messages" in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button..
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum's 9000 character limit, save it to a .txt file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link that will allow you to make the attachment.

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

What model Arduino are you using?
Have you got your model selected in the IDE?

Thanks.. Tom... :slight_smile:

How many { do you have?
How many }?

awesomechapro:
When I try to upload my code to my Arduino uno it says something about exit status 1

The something it says is telling you there's something wrong. If you post the COMPLETE error messages (press Copy Error Messages then paste in a new post)then we will be able to tell a lot more about what's wrong.

Steve

If you use the IDE autoformat tool (ctrl-t or Tools, Auto Format) and then compile, the location and nature of the error is pretty obvious. See reply #3.

This is the error code:

collect2.exe: error: ld returned 1 exit status

Using library arduino_946273 at version 2.5.0 in folder: C:\Users\——\Documents\Arduino\libraries\arduino_946273
exit status 1
Error compiling for board Arduino Uno.

Please do this:

  • When you encounter an error, you'll see a button on the right side of the orange bar "Copy error messages" in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button..
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum's 9000 character limit, save it to a .txt file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link that will allow you to make the attachment.

And again. See reply #3. You should have the same number of } as {

Oh i just figured out the problem...

i had the wrong port selected :-[

Thanks for all the support though