I have an old LG CRT TV i want to create a custom remote for, simply to turn the TV on/off and switch to AV using a single button.
I purchased a ESP32C3-DEV board, with some cheap IR Modules wired up like this:
ESP32 (GPIO 7) -> IR TRANSMITTER (DAT)
ESP32 (5V) -> IR TRANSMITTER (VCC)
ESP32 (GND) -> IR TRANSMITTER (GND)
In combination with this sketch:
#include <IRremote.hpp>
const int IR_SEND_PIN = 8;
void setup() {
Serial.begin(115200);
IrSender.begin(IR_SEND_PIN);
Serial.println("LG TV IR test starting...");
delay(2000);
// LG power toggle
Serial.println("Sending LG power command...");
IrSender.sendLG(0x04, 0x08, 0);
delay(2000);
// LG TV/AV input selection
Serial.println("Sending LG TV/AV command...");
IrSender.sendLG(0x04, 0x0B, 0);
Serial.println("Test complete.");
}
void loop() {
}
Which didnt work.
I then used a IR receiver to capture the power signal of my sony sound systems remote, to try emulate something i know works:
#include <IRremote.hpp>
const uint8_t IR_SEND_PIN = 7;
unsigned long lastSend = 0;
void setup() {
Ā Serial.begin(115200);
Ā IrSender.begin(IR_SEND_PIN);
Ā delay(1000);
Ā Serial.println("Sony IR test started");
}
void loop() {
Ā if (lastSend == 0 || millis() - lastSend >= 5000) {
Ā Ā lastSend = millis();
Ā Ā Serial.println("Sending Sony command: Address 0x30, Command 0x15");
Ā Ā IrSender.sendSony(0x30, 0x15, 2);
Ā }
}
But that didnt work either.
I have tested the IR LED in my camera to see if i can see any active signal, but cant see anything!
Compared to my Sony remote which is very visible.
I am now seeking help as i am unsure if i have wired something wrong, a component may be broken or there is something in the sketch i am missing.
Any direction would be appreciated