universal remote controller

Dear All
I am trying to create universal controller that can control IR receivers. the issue is that i am trying to merge those 2 codes but i didn't get luck, the idea that the bluetooth shield should capture the IR codes and print it to putty.
the first code is used to capture IR codes from IR receiver,

#include <IRremote.h>

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}

void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
}
#

the the other is to initialize the bluetooth shield

#include <NewSoftSerial.h> //Software Serial Port
#define RxD 6
#define TxD 7

#define DEBUG_ENABLED 1

NewSoftSerial blueToothSerial(RxD,TxD);

void setup()
{
Serial.begin(9600);
pinMode(RxD, INPUT);
pinMode(TxD, OUTPUT);
setupBlueToothConnection();

}

void loop()
{
char recvChar;
while(1){
if(blueToothSerial.available()){//check if there's any data sent from the remote bluetooth shield
recvChar = blueToothSerial.read();
Serial.print(recvChar);
}
if(Serial.available()){//check if there's any data sent from the local serial terminal, you can add the other applications here
recvChar = Serial.read();
blueToothSerial.print(recvChar);
}
}
}

void setupBlueToothConnection()
{
blueToothSerial.begin(38400); //Set BluetoothBee BaudRate to default baud rate 38400
blueToothSerial.print("\r\n+STWMOD=0\r\n"); //set the bluetooth work in slave mode
blueToothSerial.print("\r\n+STNA=SeeedBTSlave\r\n"); //set the bluetooth name as "SeeedBTSlave"
blueToothSerial.print("\r\n+STOAUT=1\r\n"); // Permit Paired device to connect me
blueToothSerial.print("\r\n+STAUTO=0\r\n"); // Auto-connection should be forbidden here
delay(2000); // This delay is required.
blueToothSerial.print("\r\n+INQ=1\r\n"); //make the slave bluetooth inquirable
Serial.println("The slave bluetooth is inquirable!");
delay(2000); // This delay is required.
blueToothSerial.flush();
}
#

help is urgently needed

the issue is that i am trying to merge those 2 codes but i didn't get luck

Luck is not involved. Skill is. Strike one.

Properly posting code is, too. Strike two.

the idea that the bluetooth shield should capture the IR codes and print it to putty.

And, the reality is? Undefined. Strike three. You're out.

Where is your attempt to combine them?

Wow!
You are one persistent cross-poster.

Be very careful how you go - the sin-bin beckons.

Posting guidelines are posted on nearly every section of the forum - please take time to read them.

sorry am new here

That's no excuse for not reading the stickies at the top of the forum:
http://forum.arduino.cc/index.php?topic=149014.0
http://forum.arduino.cc/index.php?topic=97455.0

Now, you've posted the same code incorrectly twice. Where is the code that is supposed to combine those two sketches?

Have you at least defined the requirements for the combined code?

The loop() function is called in an infinite loop. The infinite loop you have in loop() is not needed, and is likely why you can't modify the code to do anything useful. GET RID OF IT!