Instantly share code, notes, and snippets.

What would you like to do?
315Mhz wireless transmitter
This sketch transmits a short text message using the VirtualWire library
connect the Transmitter data pin to Arduino pin 12
#include <VirtualWire.h>
void setup()
// Initialize the IO and ISR
vw_setup(2000); // Bits per sec
void loop()
send("Hello there");
void send (char *message)
vw_send((uint8_t *)message, strlen(message));
vw_wait_tx(); // Wait until the whole message is gone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment