Irremote problem

Tjena, försöker lösa problemet med att använda en ir controll för att styra servo. Använder en arduino uno rev 3

detta är vad jag gjort.

#include <Servo.h>
    #include <IRremote.h>

    unsigned long Value1 = 0xFFA25D; // where XXXXXXXX is on our your remote's values
    unsigned long Value2 = 0xFF629D; // where XXXXXXXX is another button on your remote

    int RECV_PIN = 11;
    IRrecv irrecv(RECV_PIN);
    decode_results results;

    Servo servo1;

    // the setup routine runs once when you press reset:
    void setup() {             

    Serial.begin(9600);
      irrecv.enableIRIn(); // Start the receiver

      // initialize the digital pin as an output.

    servo1.attach(10); // attack servo to digital pin 10
    }

    // the loop routine runs over and over again forever:
    void loop() {

    if (irrecv.decode(&results)) {
        Serial.println(results.value, HEX);
        irrecv.resume(); // Receive the next value
      }

    if(results.value == Value1) {
    servo1.write(160);
    }
    else if  (results.value == Value2){
    servo1.write(75);
    }
    }

Jag vill kunna få hjälp med att förstå vart koderna man får av IR recivern ska in.
tacksam för all svar.

"funkar inte" - du får fel i kompilering eller Serial siger rigtigt värde men servoen rör sig inte eller vad ?

Beskriv hvad du hoppas skal hända och vad som faktisk händer

@kamokaki

Det er ikke populært at stille samme spørgsmål i flere sub-fora

http://forum.arduino.cc/index.php?topic=212568.msg1557980#msg1557980

  1. code tags. Use them
  2. auto format. Use it.
  3. serial debug output. Post it.
  4. cross post. Don't do it.

Im sorry but I dont really undestand.. I found most of the code online so can you somhow answer easier in a way someone new would understand.

Vad jag inte förstår är vart man ska sätta in värdet man får när man trycker på kontrollen och får koderna den ger av.
Anledningen till att jag skrev två olika forum är att det kanske bli enklare att förstå det på svenska då jag är en nybörjare.

I dont really undestand

Use code tags. It avoids the possibility of the forum mangling your code.
Use auto format. It makes you code easier to read.
You have debug prints in your code. Show us the output.
Don't cross-post. What more can I say?

ohh ok. cross post. I did one because its a scandinavian so people reading there could help me out.

more

What does happen when you run the program ?
Where does the servo get its power from ?

Well the servo is attached to the 5v output. Its a rather small servo that you get in a arduino kit.
Then i also have a reciver and a tiny remote included.
I have downloaded the IRREMOTE file from ken shiriff blog witch enables me to connect the reciver and type in the buttons to get the codes and raw from it.
What Ive been trying to explain is that I want to move the servo from a sertain degree to another by pressing the remote.

What I've been trying to explain is we can't see what you you can see.
Good luck.