Hello all,
I am new to the IR Remote Library. I want to disable my IR receiver whenever I want.
I know irrecv.enableIRin() will enable it. Is there some similar function that will disable it?
FYI:
I tried irrecv.disableIRin() but that didnt work. It says the function is not in the Library.
Please help.
Thank you
One way I have done it is to power the receiver from an Arduino pin. You turn the pin on when you want the receiver to work and off when not. Most IR receiver modules only use a few milliamps so it should not need a transistor to switch external power, but check the specs for the receiver module.
Thanks for the reply. When you say power off the receiver pin what exactly do you mean?
tpasaro5:
Thanks for the reply. When you say power off the receiver pin what exactly do you mean?
Run the VCC from the receiver to an Arduino pin configured as a digital output.
power off the receiver pin
You connect the IR receiver power Vcc to an output pin on the Arduino. Just make sure that if you have a 5V Arduino, the receiver needs 5V and not 3.3V (ie they are compatible). When you want to turn on the receiver, you set your Arduino pin HIGH and it turns on, LOW to turn off.
Thanks guys that's ingenious!
Or you could just leave it on and ignore the data.
Or you could just leave it on and ignore the data.
That depends on the application. In my case, I was putting the MCU to sleep to minimize the power used, and having the receiver on was not acceptable as it would use more power than the MCU.