Conflict betweeb IRremote and multiCameraIrControl libraries

Hello everybody! This is my first post on the blog and my second day with Adruino Uno. I want to build a circuit that will receive IR signals from a TV remote control and when a particular button is pressed, it will send an IR signal using an IR-LED to my Olympus E500 camera for it to shoot a picture. So, I firstly created a simple project with which I managed to receive and read IR signals using the IRremote library and then I built a very simple project in which I used an IR LED and managed to have my Olympus shooting a picture once every 5 seconds.

What works so far:
For the latter, here is the source code. This project depends on the library multiCameraIrControl. The circuit is illustrated here and it works perfectly!

What does not work:
Let us add a few simple lines in the code above and see what happens. First, let us include the IRremote library:

#include <IRremote.h>

then, let us assume we have an IR led connected to pin 2:

int RECV_PIN = 2; // Receiver
IRrecv irrecv(RECV_PIN);

and finally, let us start the receiver in the setup method:

irrecv.enableIRIn(); // Start the receiver

and let us connect Pin #2 to the ground (this is equivalent to no IR signal received from our Arduino).

Οstensibly, everything works, but my Olympus doesn’t shoot pictures any more. I repeated the whole thing several times, and I can tell for sure that once the line :

irrecv.enableIRIn(); // Start the receiver

is introduced inside my setup() method, it doesn’t work. Note that the IR led still gives some sort of signal (but I guess it is different). The fault code can be found here.

Question:
Is there a way to send the desired signal (shutter down) to my Olympus using solely IRremote - without the use of the library multiCameraIrControl.

Ok, I found a workaround… I copied into my code the part I need from the library multiCameraIrControl and I increased the value of _freq (frequency) from 40 to 47 - to find the new value, I took input from a voltage divider (with a simple potentiometer) and provided the value to the code. Here is how it looks like:

#include <IRremote.h>
int RECV_PIN = 2; // Receiver
IRrecv irrecv(RECV_PIN);
decode_results results;

int IR_LED = 3;
int INDICATOR_LED = 13;


void setup(){
  Serial.begin(9600);
  pinMode(A5,INPUT);
  pinMode(IR_LED,OUTPUT);
  pinMode(INDICATOR_LED,OUTPUT); 
  irrecv.enableIRIn(); // Start the receiver
}

void loop(){
    int freq = analogRead(A5);
    freq=constrain(freq,0,992);
    freq=map(freq,0,992,1,55);
    Serial.println(freq);   
    shutterNow(IR_LED, freq);
}

void shutterNow(int _pin, int _freq){
  bool _seq[] = {
    0,1,1,0,0,0,0,1,1,1,0,1,1,1,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1  };
  high(8972,_freq,_pin);
  wait(4384);
  high(624,_freq,_pin);
  for (int i=0;i<sizeof(_seq);i++){
    if (_seq[i]==0){
      wait(488);
      high(600,_freq,_pin);
    }
    else{
      wait(1600);
      high(600,_freq,_pin);
    }
  };
}

void wait(unsigned int time){
  unsigned long start = micros();
  while(micros()-start<=time){
  }
}

void high(unsigned int time, int freq, int pinLED){
  int pause = (1000/freq/2)-4;
  unsigned long start = micros();
  while(micros()-start<=time){
    digitalWrite(pinLED,HIGH);
    delayMicroseconds(pause);
    digitalWrite(pinLED,LOW);
    delayMicroseconds(pause);
  }
}

I noticed that at the value of _freq=40, the camera does not respond but as I turned the potentiometer to the point where that value turned 47, the camera started shooting pictures. Does anyone have an explanation ( I had something in mind, that’s how I found it but it is a mere hypothesis - If I had an oscilloscope I could tell for sure)…

XD

and let us connect Pin #2 to the ground (this is equivalent to no IR signal received from our Arduino).

Now, why would we want to do this?

I already found out how to fix the problem, but I had to do some magic inside the code of the library (see my reply above). My point was that miraculously, as we introduce a new variable in our code ( IRrecv irrecv(RECV_PIN); ) and we setup the chip using irrecv.enableIRIn();, the IR signal generated by Arduino is no more able to control the camera. I connected pin 2 to the ground to make sure that there is no interference in any possible way from there. Anyway, I realize it was unnecessary, but I think we're talking about a bug somewhere in the code (or maybe deficiency of my IR led/ camera, so that some fine tuning was needed and I incline towards this explanation).