I’m trying to send messages between two Arduino Unos. Therefore I use the 433Mhz Link-Kit and the VirtualWire library.
When running transceiver und receiver from battery, power adapter or USB-cable+powerbank all is fine. But when the receiver is running on USB (plugged into computer) then nearly no messages will be received. This drives me nuts. This way I’m not able to debug and see messages by Serial terminal on PC.
Does anybody have an idea, why the receiver (+Arduino) only works if it’s not powered by computer? (Info: The sender isn’t hit by this problem.)
No, the pins 0 and 1 are unused. Serial is working when connected by USB with PC. That's not the problem. But the VirtualWire lirary most times doesn't trigger/receive when connected per USB.
So the
if (vw_get_message(buf, &buflen)) // Non-blocking
{
...
}
(nearly) never get's true when the receiving Arduino is running on USB. If I run it by alternative power source (and connect pins 0 and 1 with Serialadapter to PC) I can see, that it's working fine.
So there must be a problem when driving Arduino from PC/USB as power source. But I don't know what exactly is going wrong... Maybe on USB/PC the ATMEGA runs with a slightly different MHz so that the 433Mhz receiver gets out of tune? Any idea?
I would like to know the cause... makes me sleep better
that same goes for me, but I can't tell you.
Both, RadioHead as also VirtualWire come with a simple "receiver"-sketch. The one from RadioHead runs without problems regardsless of the power source. The one from VirtualWire doesn't. I really don't get it. Sorry.