Modulate 2 seperate IR LED's

I have noticed that when using 2 LED's (for 2 seperate IR receivers)... only the first one I put into the code works. Is only one LED capable of producing a tone of 38000?


void setup() {
  Serial.begin(9600);
  pinMode(irSensor1, INPUT);
  pinMode(irSensor2, INPUT);
  pinMode (LED1, OUTPUT);
  pinMode(LED2, OUTPUT);

**tone (LED1, 38000);**
**tone (LED2, 38000);**

}

Thank you

When asking a hardware question, please post a wiring diagram.

Those tone frequencies are very high. Not every PWM pin has a timer driver in the IC that is capable of such high frequencies. Please consult the tone library notes for the processor you are using (you should tell us which one that is...).

Perhaps the Tone library (not the built in tone() function) would help.