Open hkraal opened 5 years ago
I am struggling with something similar; my code does work but the repeat is slow, too slow. Here is my code: https://bitbucket.org/crazyquark/edifier_remote/src/master/src/main.cpp
I think the issue is the enableIRin() part, meaning that receiving and sending cannot function independently which is really a shame. I am wondering if switching to a teensy would speed things up.
So I got the idea to make my own IR repeater so that I can control IR devices in a closed cabinet in another room. I've ended up with an Arduino which has an IR receiver (pin 2) and an IR led (pin 3) on the end of a ~10m wire which pretty much does the trick.
Reading a IR signal with
rawRecv.ino
and pasting the result in therawSend.ino
(with a little modification#define IR_SEND_PWM_PIN = 3;
) results in the ability to send IR signals to the other room.When attempting to do this in one single
.ino
it simply doesn't work. I ended up with this code which is nothing more than a combined rawRecv.ino and rawSend.ino: https://gist.github.com/hkraal/d80653b27d9b371b9a66b8ff96c69d3cThe Arduino IDE yields the following warning on the closing bracket of
mySender.send()
I've tried to correct this by replacing my loop with the code below but with the same result; my devices don't react. I'm pretty sure it's something relative simple but I don't see it myself. Any pointers / links to resources at this moment are more than welcome!