Arduino IRremote + Servo Problem

I’m having some sort of issue with this. The servo is twitchy. Using and

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 thoughts on “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
    Thanks is advance


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: