IR emitter and receiver

Here is a very comprehensive Arduino example;
https://learn.sparkfun.com/tutorials/ir-communication