 
 // EEPROM address of node id
 #define EE_ADDR_ID  0
+
+static void print(char *fmt, ...)
+{
+    char buf[128]; // resulting string limited to 128 chars
+    va_list args;
+    va_start (args, fmt);
+    vsnprintf(buf, 128, fmt, args);
+    va_end (args);
+    Serial.print(buf);
+}
 
 static uint8_t id_read(void)
 {

            memcpy(&buf->data, rcv, len);
            buf->len = len;

            Serial.print("!r ");
            Serial.println(node, HEX);

            Serial.print("Got:");
            printhex(rcv, len);
            Serial.println(".");
            break;
        }
    }


        case 0x01:
            // ping received
            print("!ping %02X\n", node);
            // prepare pong message
            fill_buffer(node, 0x02, 0, NULL);
            break;

        case 0x02:
            // pong received
            print("!pong %02X\n", node);
            break;

        default:
