IRLib2: Arduino doesn't send IR signals?

Im trying to control my TV using this Adafruit IR tutorial using the IRLib2-library.

I have hooked both IR receiver and IR led up to the Arduino like the Adafruit guides shows. Only difference is that i use a 2N3506 transistor instead of a 2N2222. My setup can be seen here.

I have been trying to combine the code to one sketch so that the Arduino will real what ever it sends it self. This is how it looks like:

#include "IRLibAll.h"

IRrecvPCI myReceiver(2); //create receiver and pass pin number
IRdecode myDecoder;   //create decoder

IRsend mySender;

void setup() {
  Serial.begin(9600);
  delay(2000); while (!Serial); //delay for Leonardo
  myReceiver.enableIRIn(); // Start the receiver
  Serial.println(F("Ready to receive IR signals"));
}

void loop() {

    if (Serial.read() != -1) {
    //send a code every time a character is received from the serial port
    mySender.send(SONY, 10, 12);
  }

  //Continue looping until you get a complete signal received
  else if (myReceiver.getResults()) {
    myDecoder.decode();           //Decode it
    myDecoder.dumpResults(true);  //Now print results. Use false for less detail
    myReceiver.enableIRIn();      //Restart receiver
  }
}

When I press a button on my remote this is what I get - which is why the values send looks like they does. But when I send something to the serial monitor, nothing happens? It doesn't seem like it is sending anything?

Would appreciate some help on this! :)

Thanks a lot

You have no resistor in line with your LED. The LED and receiver are not facing each other. You have no decoupling on the receiver.

After all that I am not sure you can send and receive IR data at the same time anyway due to the way the libraries work.

Please post any images here as an attachment and not in an off line link.

If you can put scope pins on your IR LED and see the bursts are coming then that would be first point to troubleshoot that library is actually generating signals to your IR LED.

Thanks for respons.

energycloud:
If you can put scope pins on your IR LED and see the bursts are coming then that would be first point to troubleshoot that library is actually generating signals to your IR LED.

What do you mean by “scope pins”?

Grumpy_Mike:
You have no resistor in line with your LED.

Doesn’t the transistor resistor act like this one? They don’t have any resistor besides the one hooked up to the transistor in the Adafruit example.

Grumpy_Mike:
You have no decoupling on the receiver.

Will look into this, thanks

Doesn't the transistor resistor act like this one?

No.

They don't have any resistor besides the

Then it is a crap circuit.

Scope means oscilloscope it is a piece of test equipment that very few beginners have.

I will try to add a resistor to a new LED and give it a shot

Are you sure that you have a 2N3506 transistor? In your picture it looks like a TO-92 style transistor, but when I researched 2N3506 all the results showed a round metal case (TO-39). TO-92 usually has pinouts EMITTER - BASE - COLLECTOR from left to right with the flat side facing you and the three wires pointing down. Use a digital camera or phone pointed at the IR LED to see if it's working. When the IR LED is transmitting, your camera will show it lighting up whereas your eyes won't.