IR Remote and Panasonic television codes.

Hi

I'm learning about the Arduino using the Most Complete Starter Kit and have been playing with the Heltec ESP32 Wifi kit also.

Currently, with the Arduino, i am trying to use an IR LED to control my Panasonic tele. So i used the IR sensor and read a load of codes from my existing remote and then used the ITSendDemo sketch as a basis to start controlling the tele. They were all 8 bytes in length apart from 1 which I assumed had a leading 0 dropped by the print command.

In a nutshell, none of the codes i recorded seem to work when I resend them except the On/Off code, but there's even something strange going on there.

  1. when I read the ON/Off code I mostly got 0xf61e2a57 but occasionally (~1 in 10) got 0x100BCBD - Only the latter works when I resend it.

  2. none of the other codes work eg Button No 1 0xf7283c77. In fact the LED on the tele doesn't even flash as it does when the proper controller is pressed.

As per the example, I'm using 0x4004 as the address for everything in the irsend.sendPanasonic(address, command) lines. I don't actually understand what the address is!

Any help would be appreciated. Thanks

Graham

The TV led does not flash as you have to change a hardcoded parameter.
In IRpanasonic.cpp change line 24,

enableIROut(37); -->default value was 35

Took me a whole day to figure it out :confused:
Found here : Fix incorrect frequency used for Panasonic by crankyoldgit · Pull Request #442 · Arduino-IRremote/Arduino-IRremote · GitHub

You also need to send the on/off button multiple times with delay in between before the TV will react.

This codes works :

/*

  • IRremote: IRsendDemo - demonstrates sending IR codes with IRsend
  • An IR LED must be connected to Arduino PWM pin 3.
  • Version 0.1 July, 2009
  • Copyright 2009 Ken Shirriff
  • http://arcfn.com
  • JVC and Panasonic protocol added by Kristian Lauszus (Thanks to zenwheel and other people at the original blog post)
    */
    #include <IRremote.h>

#define PanasonicAddress 0x4004 // Panasonic address (Pre data)
#define PanasonicPower 0x100BCBD // Panasonic Power button

IRsend irsend;

void setup()
{
}

void loop() {
irsend.sendPanasonic(PanasonicAddress,PanasonicPower); // This should turn your TV on and off
delay(100);
}

1 Like