No no, the problem is not the relay. The problem is the board power.
My waspmote has to receive a command in order to switch on or off the relay. This part of my code is running ok, Pin DIGITAL2 is changing its value from 0 to 3.3V.
But I can't use the relay, because the wasppmote is resetting when I switch on the power of the board. When I write this sentence, the board is resetting. If not, all ZigBee comm and I/Os are running ok, but I cannot use the relay because it is not powered.
I've tried it with other waspmote and the result is the same, so there should be some problem with my Prototype Board.
This is my initial code, and it is resetting after the print of "Unido a la red".
//Start Xbee in Zigbee, 2.4GHz, 2mW
xbeeZB.init(ZIGBEE, FREQ2_4G, NORMAL);
//Xbee power on
delay(2000);// Check if creating process success
XBee.println("Imposible unirse a la red");
XBee.println("Unido a la red!");