cyborg5 / IRLib

An Arduino library for encoding and decoding infrared remote signals
Other
213 stars 76 forks source link

Servo outputs fail when IR receiver started #5

Closed rileyelf closed 10 years ago

rileyelf commented 10 years ago

Hi, Not sure if this the best way to ask for help, if not would you be kind enough to point me in the right direction?

My project uses two servo inputs from radio controller on 5&6 I'm reading these with pulsein. These have a little processing and output to pins 8 & 9 respectively using Servo.h library. This works fine on its own. Another part of my project listens for a specific IR signal, (on pin 2) when it receives the signal it will limit servo travel. Again, on it's own the IR receiver works just fine. But when I integrate the two parts of the program and add... My_Receiver.enableIRIn(); The servo signals can still be read from the receiver but the servo output stops working completely. I'd be very grateful if you could shed some light on this. Thanks.

cyborg5 commented 10 years ago

Probably a conflict with the built in Arduino timers. Typically on the Arduino Uno I use pin 11 for input. I've had no conflicts of the servo library using that pin. There is a conflict on Arduino Leonardo because it defaults to timer 1 on my IR library and that's the same one used by the servo library.

I've also had problems if you are powering your Arduino from a regular PC or laptop USB port. Lots of times they cannot power a servo along with any other gadgets.

From: rileyelf [mailto:notifications@github.com] Sent: Wednesday, March 26, 2014 3:05 PM To: cyborg5/IRLib Subject: [IRLib] Servo outputs fail when IR receiver started (#5)

Hi, Not sure if this the best way to ask for help, if not would you be kind enough to point me in the right direction?

My project uses two servo inputs from radio controller on 5&6 I'm reading these with pulsein. These have a little processing and output to pins 8 & 9 respectively using Servo.h library. This works fine on its own. Another part of my project listens for a specific IR signal, (on pin 2) when it receives the signal it will limit servo travel. Again, on it's own the IR receiver works just fine. But when I integrate the two parts of the program and add... My_Receiver.enableIRIn(); The servo signals can still be read from the receiver but the servo output stops working completely. I'd be very grateful if you could shed some light on this. Thanks.

— Reply to this email directly or view it on GitHub https://github.com/cyborg5/IRLib/issues/5 . https://github.com/notifications/beacon/3612858__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMTQ3OTg5NiwiZGF0YSI6eyJpZCI6Mjg2MDA4MjN9fQ==--14a9c52bb8e26cfb72e23c1c786dfe11b34880f0.gif

rileyelf commented 10 years ago

Hi, Many thanks for your reply. I have tried changing to pin 11, the same result I'm afraid. I am running the Arduino from the 7.2v battery pack in my project (it's a tank BTW). a little further info if it's of any help.... I have discovered one channel is working occasionally but it is very jumpy and erratic with a very small range, the other shows no sign of life. If I comment out the enableIRin line both servo channels spring back to life. Thanks again, Drew

cyborg5 commented 10 years ago

You still haven't told me what type of Arduino you are using. There should be no conflict on Arduino Uno but there is a known conflict with Arduino Leonardo. By the way you can contact me directly at cy_borg5@cyborg5.com

From: rileyelf [mailto:notifications@github.com] Sent: Wednesday, March 26, 2014 7:06 PM To: cyborg5/IRLib Cc: Chris Young Subject: Re: [IRLib] Servo outputs fail when IR receiver started (#5)

Hi, Many thanks for your reply. I have tried changing to pin 11, the same result I'm afraid. I am running the Arduino from the 7.2v battery pack in my project (it's a tank BTW). a little further info if it's of any help.... I have discovered one channel is working occasionally but it is very jumpy and erratic with a very small range, the other shows no sign of life. If I comment out the enableIRin line both servo channels spring back to life. Thanks again, Drew

— Reply to this email directly or view it on GitHub https://github.com/cyborg5/IRLib/issues/5#issuecomment-38751736 . https://github.com/notifications/beacon/3612858__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMTQ5NDM1MSwiZGF0YSI6eyJpZCI6Mjg2MDA4MjN9fQ==--a3622ef680574af90c91f47247276475d1d52665.gif