hi,
i have a problem with virtual wire 1.27 on an attiny84.......
i think the transmitter works, but iam not shure.....
but is dont receive something......
this is ma sketch for transmitter:
"
#include <VirtualWire.h>
void setup()
{
vw_set_ptt_inverted(true); // Required for DR3100
vw_set_tx_pin(0);
vw_set_rx_pin(10);
vw_set_ptt_pin(9);
vw_setup(2400);
}
void loop()
{
const char *msg = "hello";
digitalWrite(1, 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(1, false);
delay(1000);
}
"
and this is my sketch for receiver:
"
#include <VirtualWire.h>
void setup()
{
Serial.begin(9600); // Debugging only
Serial.println("setup");
vw_set_ptt_inverted(true); // Required for DR3100
vw_set_tx_pin(10);
vw_set_rx_pin(3);
vw_set_ptt_pin(9);
vw_setup(2000);
vw_rx_start(); // Start the receiver PLL running
}
void loop()
{
uint8_t buf[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;
if (vw_get_message(buf, &buflen)) // Non-blocking
{
int i;
digitalWrite(12, true); // Flash a light to show received good message
// Message with a good checksum received, dump it.
Serial.print("Got: ");
for (i = 0; i < buflen; i++)
{
Serial.print(buf*, HEX);*
- Serial.print(" ");*
- }*
- Serial.println("");*
- digitalWrite(12, false);*
- }*
}
"
can anybody help me ?
sorry for my english (;
thank you !