Arduino Questions

I need help. I bought a matched pair of infrared emitter and detector today and need to no how I would go about setting them up on the arduino. I want to use them for an infrared alarm system. or for a rotary encoder. I also got cadmium sulfide photocells and I need to know how to connect them to the arduino to control leds when it gets dark. I also bought a 20 pack of leds and I made a knight rider led scanner with 3 different colored leds. I used 4 red 4 green and yellow. It looks awesome. I plan on building more stuff with my led's.

To get such specific help requires specific information. Links to the datasheets for the IR emitter, detector, and photo cell would be a good starting point.

Lefty