sending raw TVcode with IRremote library

Solved:

following this blog post:

and using the github example IRrecord:

I can record the raw codes using IRrecord:
Raw (36): 15716 8950 -4450 500 -2200 550 -2200 500 -2200 550 -2200 500 -4450 550 -4400 550 -2200 500 -2250 500 -2200 550 -2200 500 -2200 550 -2200 500 -4450 550 -2200 500 -4450 500 -4450 550

put in text file rawcodes.txt

use sed to remove ‘-’ signs:
sed -i “s/find/replace/” test.txt —> sed -i “s/-//” rawcodes.txt

use sed to add commas:
sed -i “s/ /,/” test.txt —> sed -i “s/-//” rawcodes.txt

use in .pde!

/*
 * 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;
const int buttonPin = 12; 
int buttonState = 0; 
unsigned int rawCodes[] = {8850, 4550, 450, 2300, 450, 4500, 450, 2250, 500, 4500, 450, 2250, 500, 2250, 450, 2250, 500, 2250, 450, 2300, 450, 2250, 500, 2250, 450, 2250, 500, 2250, 450, 4500, 500, 4500, 450, 2250, 500};             

void setup()
{
    pinMode(buttonPin, INPUT); 
}

void loop() {
 
    buttonState = digitalRead(buttonPin);
    if (buttonState == HIGH) { 
             for (int i = 0; i < 3; i++) {
    irsend.sendRaw(rawCodes, 35, 38);
      delay(100);
    }

  }
  else {}
 

}

Am I missing something or is there a legitimate reason why the recorded codes don't match the codes used in the .pde?

I've tried this too and no luck : ( idk why but the raw codes just aren't accurate enough

I was hoping it was just me... I am trying to send codes to my cable box, but apparently it wants raw codes... I set up LIRC on my laptop to check the codes from my remote against what I am getting from IRremote, but the IRremote library is decoding different pulses than what Lirc is telling me... I am stumped on this one..

Though, all of the known protocols seem to work well...

Do you know what the carrier frequency is for your cable box?

No, but it is a scientific atlanta explorer 8300hdc

I saw a post online that said Scientific Atlanta uses 57.6khz carrier frequency. My code is using 38khz, which is the first problem.

...I figured out why the recorded codes don't match the codes used in the .pde. According to comments in the IRremote library "Marks tend to be 100us too long, and spaces 100us too short when received due to sensor lag."

But he also says he compensates for that : /