I am working on a universal IR remote project that uses a 2.4" TFT screen, Arduino Uno, and an IR LED. The limitation is the IRremote library that only allows for 2 pins (D3 [timer 2] and D9 [timer 1]) on the Arduino to transmit IR signals. Unfortunately, both these pins are in use by the TFT screen.
I have found that if I disable connectivity of the IR LED when the screen is drawing/refreshing and connect it when i need to send a signal, they both work fine. The issue is I don’t want to have to have a manual/physical means to connect the IR LED when it’s time to send.
I was wondering if there’s a way I could use one of the digital I/O pins on the Arduino Uno not occupied by the TFT screen (D10 - 13 are free when SD card is not in use) to control connectivity of the IR LED pin (occupied by the TFT). That way I could just programmatically turn on the pin when I’m ready to send IR, and turn off that pin after sending.
I was able to mimic this concept up using a momentary switch to temporarily connect the IR LED when it’s ready to send. It works perfect, but if I can control that using an I/O pin, that that would streamline the physical design.
I also tried to manipulate the LiquidCrystal library to use different digital pins in an attempt to free up either pin 3 or pin 9 for use the IR send, but was unsuccessful.
// Init LCD
// Draw and fill LCD items
// Listen for touch
// Detect touch for sending IR commands
// Enable IR connectivity by controlling another pin connected in circuit to IR LED
// Send IR code
// Disable IR connectivity
// Resume TFT drawing/filling/refreshing
Any help is greatly appreciated! Thanks.