Paso 4: Código para
Puede descargar el archivo transmitter.ino o haga clic derecho y seleccione "abrir en Nueva pestaña" y copie el código en un nuevo sketch de Arduino.
//Created by William_L //Transmitter Code // //Purpose: // The transmitter emits a specific code that is user defined by the variable pass[], // when the receiver detects that specific signal, an action is carried out // on the reciever end. //Date: 23/12/2015 #include <VirtualWire.h> #include <avr/io.h>//Button is hooked up on pin 10 //Transmission data is attached to pin 11 const int transmission_pin = 12; const int button = PD3; const char pass[]="home"; //change the value here to change the signal password void setup() { //data directions DDRD &= ~(1<<button) //initialize serial monitor initUSART(); } ......