arduino error

What did I do wrong ?

this is my error copy:

Arduino: 1.6.5 (Windows 8.1), Board:"Arduino Uno"

remote.ino: In function 'void loop()': remote:81: error: expected '}' at end of input remote:81: error: expected '}' at end of input expected '}' at end of input

void loop () has a '{' at the beginning and a '}' at the end

i think '}' is missing at the end of your code in void loop

don’t think so this is the code:

//#include “global_def.h” // These don’t seem to work. They should.
//#include “ms_remote_map.h” // These don’t seem to work. They should.
#include <IRremote.h>

//#define ms_remote_map.h

//below mappings are for Microsoft Media Center Remote
#define OK_POS1 0x800F0422
#define OK_POS2 0x800F8422
#define VOL_DWN_POS1 0x800F041F
#define VOL_DWN_POS2 0x800F841F
#define VOL_UP_POS1 0x800F041E
#define VOL_UP_POS2 0x800F841E
#define MAX_BRIGHT 255
#define SL_BD_RT 9600

#define RECV_PIN 11
#define LED_PIN 5 // choose the pin for the LED

byte ledState;
IRrecv irrecv(RECV_PIN);
decode_results results;
boolean power_state = LOW;

void setup(){
Serial.begin(SL_BD_RT);
irrecv.enableIRIn(); // Start the receiver
pinMode(LED_PIN, OUTPUT); // declare LED as output
}

void loop() {
if (irrecv.decode(&results)) { //If IR receive results are detected
// Serial.println(results.value, HEX);
switch (results.value) {

//Power
case OK_POS1:
// Serial.println(“Power”);
ledState = 125;
digitalWrite(LED_PIN, LOW); // turn LED ON
break;

case OK_POS2:
digitalWrite(LED_PIN, HIGH); // turn LED ON
break;

//Dim
case VOL_DWN_POS1:
ledState -= 10;
if (ledState > 0){
analogWrite(LED_PIN, ledState); // Dim LED
}
break;

case VOL_DWN_POS2:
ledState -= 10;
if (ledState > 0){
analogWrite(LED_PIN, ledState); // Dim LED
}
break;

//Brighten
case VOL_UP_POS1:
if (ledState < MAX_BRIGHT){
ledState += 10;
}
analogWrite(LED_PIN, ledState); // Brighten LED
break;

case VOL_UP_POS2:
if (ledState < MAX_BRIGHT){
ledState += 10;
}
analogWrite(LED_PIN, ledState); // Brighten LED
break;
//default:
// Serial.println("");
}

Please read the two posts at the top of this Forum for guidelines when posting here. One of the things it suggests is that you post your code using the code tags so we can see the source of your error. Not doing so forces us to guess what's wrong rather than pointing to the answer.

I'm sorry but I can't fix this myself and I have made a copy from the error in my first post

You're missing two curly braces by my count.

There are three curly braces opened here:

void loop() { if (irrecv.decode(&results)) { //If IR receive results are detected // Serial.println(results.value, HEX); switch (results.value) {

but you only close 1 of them at the end of loop().

The error message after supplying the missing braces is:

E:\Arduino1.6.5\libraries\RobotIRremote\src\IRremoteTools.cpp:5:16: error: ‘TKD2’ was not declared in this scope
int RECV_PIN = TKD2; // the pin the IR receiver is connected to
^
Error compiling.

which tells me that there is an error in the IRremoteTools.cpp file with the variable TKD2. I can’t find it either.

yes I got that error now.
thanks for so far!

who knows how I can fix this. :sob:

It's using the RobotIRremote library, which uses pin names used only on the robot board, not normal Arduinos, rather than the correct IRremote library

Take a look here for some more discussion on it: https://github.com/z3t0/Arduino-IRremote/issues/91

thx for the site but I still cant fix it :sob: if someone knows please let me know

if someone knows please let me know

If there is some part of “Delete the file that won’t compile” that you can’t understand, you aren’t smart enough to own an Arduino. Return it.