Two libraries causing problems with each other

Hi all,

I have a problem: I am trying to control a Spotlight via a DMX Shield and control some RF- Power Outlets at the same time.
There are two different protocols I am controlling the power outlets with. Unfortunately when I am using the DMXMaster Library the power outlet controlled with the binary code does not work anymore.
Does anyone has an idea what might cause the problem?

Thanks in advance!

Here is my code:
#include <DmxMaster.h>
#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();
RCSwitch mySwitch2 = RCSwitch();

void setup() {

//Serial.begin(9600);

// Transmitter is connected to Arduino Pin #10
mySwitch.enableTransmit(10);
mySwitch2.enableTransmit(10);

// mySwitch.setPulseLength(360);
DmxMaster.usePin(3);
DmxMaster.maxChannel(1);

}

void loop() {

mySwitch2.send(“000000000000000000010100”);
delay(1000);

mySwitch.switchOn(‘b’, 2);

DmxMaster.write(1, 255);
delay(12000);

mySwitch.switchOff(‘b’, 2);
DmxMaster.write(1, 0);
delay(1000);

mySwitch2.send(“000000000000000000010101”);
delay(60000);

}

Links to the libraries?

RCSwitch mySwitch = RCSwitch();
RCSwitch mySwitch2 = RCSwitch();

Wrong. You NEVER call the constructor explicitly.

RCSwitch mySwitch;
RCSwitch mySwitch2;
  // Transmitter is connected to Arduino Pin #10 
  mySwitch.enableTransmit(10);
  mySwitch2.enableTransmit(10);

Both of them? Why do you need two of them, then?

Hi,

thanks for your quick response.
Here are the links for the two libraries:

http://www.tinkerkit.com/dmxmaster-library/#dmxmaster

Your are right. I was using a different pin for mySwitch2 before. But this way it does not make a difference.
Didn´t know that about the constructor. I don´t think that this is what is causing the problem because without the DMX part it works just fine.

I appreciate any thoughts on this!