ZigduinoRadio

Frank Zhao has release ZigduinoRadio, a radio library based on uracoli for the Zigduino. Its interface bears a strong resemblance to both the Wire library and the Serial class in the Arduino core. As a result, it is the easiest method for users to get bytes moving over the air. As a result, it lacks more sophisticated networking features. However, such features are unnecessary for using Zigduinos for tasks such as remote control and as the equivalent of wireless serial cables. 

Basic use of the library is about as straightforward as communication libraries get:

  • ZigduinoRadio.begin(<channel>) starts the radio on the given <channel>.
  • ZigduinoRadio.beginTransmission() opens a transmission.
  • ZigduinoRadio.write(<byte>) one or more times appends <byte> to the outgoing frame.
  • ZigduinoRadio.endTransmission() sends the frame built up by the calls to ZigduinoRadio.write().
  • ZigduinoRadio.available() checks whether any bytes are available.
  • ZigduinoRadio.read() retrieves a byte from the receive buffer.

And that's all that's required to send and receive bytes. There are a number of other useful features, in particular a nice event model that allows you to define callback functions for various things such as on receipt of a message, on completion of a transmission, on error, etc. Naturally, a variety of radio diagnostics derived from uracoli are also available.