Hello everyone,
I'm having trouble with IRsend and a Teensy 4.0. I should mention that this is my first dive into Teensy (although I have done a fair bit of Arduino and other), but I am probably doing something silly here. I had no trouble duplicating the IRrecv example program, and for example grabbed codes from 4 or 5 remotes I am hoping to replace. But I'm stuck trying to get IRsend working.
Here's details on where I've got to/what I've done so far.
* I'm using the Example Program Transmit code but with the send command:
-This is a code and type (NEC) that I read from one of my existing remotes (TV on|off)
-'32' is my figuring from the other numbits examples I could find (could be wrong).
* From my reading of hardware/teensy/avr/libraries/IRremote/boarddefs.h I'm using pin 7:
-and I have a Wurth LED IR 940NM (#15400594A3590) being fed about 35mA via a simple MOSFET driver and pin 7.
* If I comment the IRsend code, and send a simple 1 sec square wave out of pin 7:
I can see this on a logic analyzer, and my phone camera can see the IR LED flashing - so I believe my hardware set up is working sensibly thus far. But unfortunately switching back to the example IRsend code, my phone camera does not see the LED blink, I cannot find any signal with a basic logic analyzer, and it does not work if I hold it close to the TV receiver 'eye'.
I can imagine several things I might be wrong about, and would hugely appreciate any advice or guidance as to what I might focus on next:
* My interpretation that I should be using pin 7 for Teensy 4 & IRRemote send might be wrong
* The 38kHz IRsend signal may be too fast for me to have found it so far with phone camera or analyzer (would be surprised tho) and everything is actually working, and I need to debug the IR codes I am sending
* The code I am trying to send - sendNEC(0x2FD48B7, 32) - is not valid and the IRRemote library will not process it
* Something else..
Briefly my setup is Ubuntu 18.04 desktop, Arduino IDE 1.8.12 for compile/deploy and sublime for writing code.
If I've missed any important details apologies, and please just let me know, and I would really welcome any insights from the experts!
I'm having trouble with IRsend and a Teensy 4.0. I should mention that this is my first dive into Teensy (although I have done a fair bit of Arduino and other), but I am probably doing something silly here. I had no trouble duplicating the IRrecv example program, and for example grabbed codes from 4 or 5 remotes I am hoping to replace. But I'm stuck trying to get IRsend working.
Here's details on where I've got to/what I've done so far.
* I'm using the Example Program Transmit code but with the send command:
Code:
irsend.sendNEC(0x2FD48B7, 32);
-'32' is my figuring from the other numbits examples I could find (could be wrong).
* From my reading of hardware/teensy/avr/libraries/IRremote/boarddefs.h I'm using pin 7:
Code:
// Teensy 4
#elif defined(__IMXRT1052__) || defined(__IMXRT1062__)
#define IR_USE_TIMER_FLEXPWM1 // tx = pin 7
* If I comment the IRsend code, and send a simple 1 sec square wave out of pin 7:
Code:
pinMode(7, OUTPUT);
digitalWrite(7, HIGH);
delay(1000);
digitalWrite(7, LOW);
delay(1000);
I can imagine several things I might be wrong about, and would hugely appreciate any advice or guidance as to what I might focus on next:
* My interpretation that I should be using pin 7 for Teensy 4 & IRRemote send might be wrong
* The 38kHz IRsend signal may be too fast for me to have found it so far with phone camera or analyzer (would be surprised tho) and everything is actually working, and I need to debug the IR codes I am sending
* The code I am trying to send - sendNEC(0x2FD48B7, 32) - is not valid and the IRRemote library will not process it
* Something else..
Briefly my setup is Ubuntu 18.04 desktop, Arduino IDE 1.8.12 for compile/deploy and sublime for writing code.
If I've missed any important details apologies, and please just let me know, and I would really welcome any insights from the experts!