Apr 272012

I’m having some sort of issue with this. The servo is twitchy. Using https://github.com/shirriff/Arduino-IRremote and http://arduino.cc/en/Reference/Servo

It twitches just by having both enabled. I’ve included the code I used for the first part of the video. If you know why this is happening, I’d love to hear it.

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

int RECV_PIN = 7;

IRrecv irrecv(RECV_PIN);

decode_results results;

Servo myservo;
int pos = 90;

void setup()
  irrecv.enableIRIn(); // Start the receiver

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

  3 Responses to “Arduino IRremote + Servo Problem”

  1. Hello, I am curious if you found a fix to your servo + IR issue. I am having the same problem whenever I attach a servo within the IRrecvDemo sketch. Thank you.

  2. i am testing both ir and servo libraries, i saw the problem is:
    interrupts, infrareds and servos using interrupts, and this is happining.

  3. Dear Sky

    I am also having same problem of twicthing of servo when trying to control with Remote control?
    Can you please share any solution or code related to this.My project is stuck because of this issue.

    My Email id is shail363@yahoo.com
    Thanks is advance

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>