This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // receiver.ino | |
| // | |
| // Simple example of how to use VirtualWire to receive messages | |
| // Implements a simplex (one-way) receiver with an Rx-B1 module | |
| // | |
| // See VirtualWire.h for detailed API docs | |
| // Author: Mike McCauley ([email protected]) | |
| // Copyright (C) 2008 Mike McCauley | |
| // $Id: receiver.pde,v 1.3 2009/03/30 00:07:24 mikem Exp $ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // transmitter sketch | |
| // | |
| #include <VirtualWire.h> | |
| uint8_t buf[VW_MAX_MESSAGE_LEN]; | |
| uint8_t buflen = VW_MAX_MESSAGE_LEN; | |
| const char *on2 = "a"; | |
| const char *off2 = "b"; | |
| const char *on3 = "c"; | |
| const char *off3 = "d"; | |
| void setup() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // receiver sketch | |
| // | |
| #include <VirtualWire.h> | |
| uint8_t buf[VW_MAX_MESSAGE_LEN]; | |
| uint8_t buflen = VW_MAX_MESSAGE_LEN; | |
| void setup() | |
| { | |
| vw_set_ptt_inverted(true); // Required for RF link modules | |
| vw_setup(300); | |
| vw_set_rx_pin(11); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // data transmitter sketch// | |
| // | |
| #include <VirtualWire.h> | |
| // use onboard LED for status | |
| const int ledPin = 13; | |
| // we'll send the value of analog pin 1 | |
| const int Sensor1Pin = A1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // data receiver sketch | |
| // | |
| #include <VirtualWire.h> | |
| // use onboard LED for status | |
| const int ledPin = 13; | |
| int Sensor1Data; |
OlderNewer