i need help with working code

i made this to control my directv...but i could not figure out what frequency i should use so i made the arduino scan and it worked if i was close by but i think i may have burned out my led.... is there a problem with the code i wrote???

/*
 * 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
 */
unsigned int rawCodes[] = {6054,1157,1220,1176,631,564,627,569,1223,572,1232,1162,1216,580,624,1169,629,1165,629};
#include <IRremote.h>

IRsend irsend;

void setup()
{
  Serial.begin(9600);
}

void loop() {
  if (Serial.read() != -1) {
    for (int i = 0; i < 3; i++) {
       delay(40);
      irsend.sendRaw(rawCodes,32,70); // Scanning...
           delay(1000);
      irsend.sendRaw(rawCodes,32,71); // 
    delay(1000);
      irsend.sendRaw(rawCodes,32,72); // 
       delay(1000);
      irsend.sendRaw(rawCodes,32,73); // 
          delay(1000);
      irsend.sendRaw(rawCodes,32,74); // 
        delay(1000);
      irsend.sendRaw(rawCodes,32,75); //
         delay(1000);
      irsend.sendRaw(rawCodes,32,76); //
          delay(1000);
      irsend.sendRaw(rawCodes,32,77); //
      delay(1000);
           irsend.sendRaw(rawCodes,32,78); //
      delay(1000);
           irsend.sendRaw(rawCodes,32,79); //
      delay(1000);
           irsend.sendRaw(rawCodes,32,80); //
     delay(1000);
         

}
  }
}

i am going to buy another one here soon

if you press CTRL-T in teh IDE the code reformats the style to make it more readable.

if (Serial.read() != -1) {

better use

if (Serial.available() > 0)
{
int c = Serial.read();

Can you tell more about what you trying to accomplish, it is quite unclear from the code alone ...

my mother-in-law aggrivates me with the tv by turning the volume way too loud so i am trying to come up with a way to power off the box when she does so discretely. i need to figure out what freq. that would be best to use with dtv or have a better understanding of what the freq. part of the code does. the finished product will fit inside a sharpie

the part of the code i am having problems with is

 irsend.sendRaw(rawCodes,32,70);

70 is the frequency

the raw code now only shows the info of the show on.which for testing is fine
i am using the serial for another project like a visual basic tv remote

i need a way to have more range;
adding another ir-led and maybe some code tweaks

datacurve:
i made this to control my directv...but i could not figure out what frequency i should use so i made the arduino scan and it worked if i was close by but i think i may have burned out my led..

I imagine if you burned out your LED, you probably did not use the appropriate resistor. I also imagine no matter how discrete you think you will be, you won't be, and that doing this may increase the hostilities between you and your mother-in-law even more.

MichaelMeissner:

datacurve:
i made this to control my directv...but i could not figure out what frequency i should use so i made the arduino scan and it worked if i was close by but i think i may have burned out my led..

I imagine if you burned out your LED, you probably did not use the appropriate resistor. I also imagine no matter how discrete you think you will be, you won't be, and that doing this may increase the hostilities between you and your mother-in-law even more.

lol it can't get any worse... but it did give me a victory she thought my box was broken... lmao