A few more technical details, for those interested.
As said above, this RF kit can be used on a serial or digital port.
While it might be possible to write/read a raw stream of bytes, this will probably yield bad results. RF communications on highly used radio bands, like the 433MHz one, need quite a lot of work to be usable. That’s where the VirtualWire library comes into play. From what I gathered, this library encodes the payload in a way that is less prone to interferences (of course, the receiver end needs to decode it). There’s also some kind of smart synchronization between the two ends of the communication channel. Not the kind of code one should attempt to reinvent on his own.
VirtualWire is now deprecated by RadioHead, from the same person.
While RadioHead introduces much more advanced capabilities, I chose to stick with VirtualWire for the time being, since:
- The new features introduced by RadioHead might not be useful to most people, and several of them require a duplex communications (and 2 pairs of receivers/transmitters)
- Including this library in the firmware significantly increases its byte code footprint, much more than VirtualWire
- Last but not least, Seeedstudio's examples rely on VirtualWire. It will be easier to integrate in a setup with multiple grove devices if we stick to this initial choice
If you feel my integration choice is not the wisest one, feel free to drop me a line!
Please note that some other libraries exist for specific uses. I mentioned earlier 433Utils, which makes it relatively easy to interact with remote-controlled wall sockets. This library also use encoding technics found in this kind of hardware.