Need IR reader and writer with almost any controller
-
I've been trying to get the various IR programs to work, and have not been successful. I have almost every controller (M5StickCPlus, M5Atom, M5Core2) and even IR Reflective sensor.
I just want a simple program that will read the IR from a TV remote control, and let the program sent that same IR to the TV (a universal remote).
I also don't know what it means in the code examples:
now, you can see the infrared light through mobile phone camera
Anyway, getting this to work would be great for my disabled users.
ps. I'm using Arduino C++ code.
thanks,
scott -
"now, you can see the infrared light through mobile phone camera" - this is just simple way to tell if your controller or remote is sending anything out (IR diode flashes on transmission)
few devices have IR transmitter build in so by adding IR reciever you are almost there...you can read...save and send TV IR codes
-
Most IR Remote use RC-5 coding. See https://en.wikipedia.org/wiki/RC-5
Often the IR LED is pulsed with high current on very low duty to increase the working distance (refer the datasheet of your IR LED for maximal pulse ratings). If you have a "normal" IR LED on a GPIO it might be less effective. In this case you have to try very close to the receiver. -
@holofloh Thanks for the reply. I'm not using RC-5 with my ESP32 M5 controllers.
I'm using the IR for the M5.
So any examples that work with that would be nice.
thanks, -
@robski I guess I haven't seen IR on my iPhone "mobile phone camera".
So I'm looking for code that works, not a couple examples that aren't working for me (eg. the IR doesn't turn the TV on).
Any production example would be nice.
thanks,
scott -
@konacurrents You wrote "I'm not using RC-5 with my ESP32 M5 controllers" and in the next posting "eg. the IR doesn't turn the TV on"
So do you want to remote control a TV or another device? If you not using RC-5 what alternative protocol does your device use?For the mentioned test by the mobile phone camera: Test if ANY working remote from TV or HiFi etc... is visible by your mobile phone camera. Point the transmitter to the camera and press a button. If you see a flashing light, then your camera is able to see the IR light.
Now do the same at the M5StickCPlus when one of the examples is running.If there is no flashing IR then investigate on the port number of the IRLED on your device and change it in the code to the right one. If it flashes but your receiving device is not reacting to it, it may be a wrong protocol or command.
It may help if you post the code you are trying and a description of what exactly you want to control.
-
what is the code that isn't working for you and what devices are you using with it? I can take M5Stick with M5 IR module connected via groove port and it works fine