OH MY EFFING GOD! You, my friend, are a FREAKING champion!!!!!!!
I GOT IT WORKING!!!! Thank you soooooo much! Far out! How did I not know about such a simple thing? Where can I learn about all these little essential things?!?!!
/*
Simple example for receiving
http://code.google.com/p/rc-switch/
*/
#include <RCSwitch.h>
#define RELAY 5
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
pinMode(RELAY, OUTPUT);
mySwitch.enableReceive(0); // Receiver on inerrupt 0 => that is pin #2
}
void loop() {
if (mySwitch.available()) {
unsigned long value = mySwitch.getReceivedValue();
if (value == 5592323UL) {
digitalWrite(RELAY, HIGH);
Serial.print("Unknown encoding");
} else {
Serial.print("Received ");
Serial.print( mySwitch.getReceivedValue() );
Serial.print(" / ");
Serial.print( mySwitch.getReceivedBitlength() );
Serial.print("bit ");
Serial.print("Protocol: ");
Serial.println( mySwitch.getReceivedProtocol() );
}
mySwitch.resetAvailable();
}
}
This works, I just need to change the sketch to toggle on and off and that is it!!!
Thank you so much man!
And Paul, thanks alot for your help, even if you have the shits with me! ![]()