Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <VirtualWire.h>
- void setup()
- {
- Serial.begin(9600); // Debugging only
- Serial.println("Wpisz cos: ");
- // Initialise the IO and ISR
- vw_set_ptt_inverted(true); // Required for DR3100
- vw_setup(2000); // Bits per sec
- }
- void loop()
- {
- char TestData;
- if(Serial.available() )
- {
- TestData = Serial.read();
- Serial.print (TestData); // echo the incoming character to the LCD
- const char *msg = TestData;
- digitalWrite(13, true); // Flash a light to show transmitting
- vw_send((uint8_t *)msg, strlen(msg));
- vw_wait_tx(); // Wait until the whole message is gone
- digitalWrite(13, false);
- delay(200);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement