using a remote to dim & select LED light

I am fairly new to the arduino world, and as I am going through examples and learning I also am combining projects together to help me learn, and see new things. My current project how ever is giving me some trouble.
What I would like to do is control a series of LED's by way of a remote control. I have 8 LED's connected to an arduino UNO by way of a 8 bit shift resister (IC SN74HC595N), and a IR receiver. I have code that I know works with the IR receiver, and I have code that works with my shift resister. The following is a simple proof of concept to make them work together:

#include "IRremote.h"
int LatchPin = 5;
int ClockPin = 6;
int DataPin = 4;
int OutputEnablePin = 10;
int LedTest = 10;
bool t = true;
bool f = false;

int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

byte Leds = 0;
void setup() {
pinMode(LatchPin, OUTPUT);
pinMode(DataPin, OUTPUT);
pinMode(ClockPin, OUTPUT);
pinMode(OutputEnablePin, OUTPUT);

void loop() {
  if (irrecv.decode(&results)) 
    Serial.println("Does this actually work?");
    Serial.println("after LedTester()");
void updateShiftRegister()
  digitalWrite(LatchPin, LOW);
  shiftOut(DataPin, ClockPin, LSBFIRST, Leds);
  digitalWrite(LatchPin, HIGH);
void setBrightness(int brightness)
  analogWrite(OutputEnablePin, 255-brightness);
void IrInput() 
  if (irrecv.decode(&results)) {
    Serial.println("This finally works");
void LedTester()
  for (int i = 0; i < 8; i++)
    bitSet(Leds, i);
  for (int b = 255; b > 0; b--)
    Serial.print("Byte Brightness: ");

If you run the code as is, it will start up and as soon as you push a button on a remote, it triggers the LEDTester(). and also prints out following line. So I know it is getting stuck on the irrecv.resume() but I do not know why. I have my shift resister hooked up through 4,5,6,10 and my IR sensor is hooked up through 11.

My theory is it has something to do with timing and PWM, but I am not sure what. I have looked and searched around. Most sites suggested trying to switch the pins that I am using around which I did, and it made it work up till this point.

Any suggestions, or hints towards the right direction would be more then greatly appreciated.

Attached is the schematic that I used for my hook up.


I understand neither your problem, nor what you want to achieve :frowning:

Please explain what should happen when an IR input is received.

Since the IRremote library uses an timer (timer 2?), PWM is not usable with pins depending on that timer.
What happens when you call enableIRIn before or instead of resume?