diff --git a/examples/x10rf_send/x10rf_send.pde b/examples/x10rf_send/x10rf_send.ino similarity index 79% rename from examples/x10rf_send/x10rf_send.pde rename to examples/x10rf_send/x10rf_send.ino index 84de44a..8bc5bff 100644 --- a/examples/x10rf_send/x10rf_send.pde +++ b/examples/x10rf_send/x10rf_send.ino @@ -1,8 +1,8 @@ #include #include -#define tx 11 // Pin number for the 433mhz OOK transmitter -#define reps 1 // Number of times that a RF command must be repeated. -#define ledpin BLUE_LED // Pin for the led that blinks when a command is send. (0 = no blink) +#define tx 7 // Pin number for the 433mhz OOK transmitter +#define reps 5 // Number of times that a RF command must be repeated. +#define ledpin 13 //BLUE_LED // Pin for the led that blinks when a command is send. (0 = no blink) x10rf myx10 = x10rf(tx,ledpin,reps); diff --git a/x10rf.cpp b/x10rf.cpp index c1208b9..d5bcbc7 100644 --- a/x10rf.cpp +++ b/x10rf.cpp @@ -12,7 +12,15 @@ Tested on a TI Stellarpad (LM4F120H5QR) and Energia 0101E0010. This should also */ #include -#include + +#if defined(ARDUINO) && ARDUINO >= 100 + #include "Arduino.h" +#elif defined(ENERGIA) // LaunchPad, FraunchPad and StellarPad specific + #include "Energia.h" +#else + #include "WProgram.h" +#endif + #include "x10rf.h" #define X10_RF_SB_LONG 8960 // Start burts (leader) = 9ms diff --git a/x10rf.h b/x10rf.h index 7ae45cc..73cf841 100644 --- a/x10rf.h +++ b/x10rf.h @@ -15,10 +15,15 @@ Tested on a TI Stellarpad (LM4F120H5QR) and Energia 0101E0010. This should also #ifndef x10rf_h #define x10rf_h -//#include "Arduino.h" -//#include "Energia.h" #include -#include + +#if defined(ARDUINO) && ARDUINO >= 100 + #include "Arduino.h" +#elif defined(ENERGIA) // LaunchPad, FraunchPad and StellarPad specific + #include "Energia.h" +#else + #include "WProgram.h" +#endif class x10rf {