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.
[c]
#include <IRremote.h>
#include <Servo.h>
int RECV_PIN = 7;
IRrecv irrecv(RECV_PIN);
decode_results results;
Servo myservo;
int pos = 90;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
myservo.attach(9);
myservo.write(pos);
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
}
[/c]
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.
LikeLike
i am testing both ir and servo libraries, i saw the problem is:
interrupts, infrareds and servos using interrupts, and this is happining.
LikeLike
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
Regards
Shailesh
LikeLike