document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include <VirtualWire.h>
  2. char *controller;
  3. void setup() {
  4. pinMode(13,OUTPUT);
  5. vw_set_ptt_inverted(true); //
  6. vw_set_tx_pin(12);
  7. vw_setup(4000);// speed of data transfer Kbps
  8. }
  9.  
  10. void loop(){
  11. controller="1" ;
  12. vw_send((uint8_t *)controller, strlen(controller));
  13. vw_wait_tx(); // Wait until the whole message is gone
  14. digitalWrite(13,1);
  15. delay(2000);
  16. controller="0" ;
  17. vw_send((uint8_t *)controller, strlen(controller));
  18. vw_wait_tx(); // Wait until the whole message is gone
  19. digitalWrite(13,0);
  20. delay(2000);
  21.  
  22. }
');