SHARE
TWEET

VirtualWire.SimpleSend

a guest Mar 27th, 2014 120 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. SimpleSend
  3. This sketch transmits a short text message using the VirtualWire library
  4. connect the Transmitter data pin to Arduino pin 12
  5. */
  6. #include <VirtualWire.h>
  7. void setup()
  8. {
  9. // Initialize the IO and ISR
  10. vw_setup(2000); // Bits per sec
  11. }
  12. void loop()
  13. {
  14. send("Hello there");
  15. delay(1000);
  16. }
  17. void send (char *message)
  18. {
  19. vw_send((uint8_t *)message, strlen(message));
  20. vw_wait_tx(); // Wait until the whole message is gone
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top