(This sketch also demonstrates facePrintf, using the SFB-specific (and confusing-looking) '%#p' format code. In facePrintf, '%p' takes a packet pointer and appends the contents of that packet to the output. When the '#' "modifier" is added to '%p' (as in this case), it means append the packet contents, but print any 'non-printable' ASCII characters in hexadecimal.)
// log: Read packets consciously from SOUTH, log them to NORTH void setup() { SouthFace.begin(9600,false); // Open south in conscious packet mode, 9600 8N1 } // (NORTH unmentioned, defaults to reflex packet mode) void loop() { u8 * packet = SouthFace.readPacket(); // Check for packet from south if (packet) // Got one! facePrintf(NORTH,"Ld '%#p'\n",packet); // Wrap it in a Log packet and send it NORTH }