Go Down

Topic: Issue controlling TV with Arduino (Read 867 times) previous topic - next topic

Nicknml

I've been playing around with controlling my TVs with my Arduino Uno.  The two TVs that I've been controlling are a Dynex and an Insignia that use the same NEC protocol and the same codes.  Using the code below works perfectly on the Dynex but for some reason with the Insignia instead of receiving "7.3" It gets "77.33"
Code: [Select]
/*
* 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
*/
#include <IRremote.h>

IRsend irsend;

void setup()
{

}

void loop() {
delay(3000);
  for (int i = 0; i < 3; i++) {
      irsend.sendNEC(0x61A0F00F,32); // powerup
      delay(40);
    }
   
    delay(12000);
    for (int i = 0; i < 3; i++) {
      irsend.sendNEC(0x61A0609F,32); // 7
      delay(40);
    }
    delay(300);
    for (int i = 0; i < 3; i++) {
      irsend.sendNEC(0x61A0827D,32); // .
      delay(40);
    }
    delay(300);
    for (int i = 0; i < 3; i++) {
      irsend.sendNEC(0x61A040BF,32); // 3
      delay(40);
    }
    delay(300);
    for (int i = 0; i < 3; i++) {
      irsend.sendNEC(0x61A018E7,32); // enter
      delay(40);
    }
    delay(15000);
}

wildbill

Without knowing anything about what you're doing and just reading the code, it appears that you're sending each character three times. Apparently, the Insignia notices the repetition to some extent but the Dynix doesn't.

Nicknml

Thanks, that what was going on, so obvious now!


Go Up