                  "  a <port> <device>   Add device to port\r\n"
                  "  d <port> <device>   Remove device from port\r\n"
                  "  c <port>            Clear all devices from port\r\n"
+                 "  r <device> <delay>  Set measurement period for device (in 0.1s)\r\n"
                  "  l                   List defined devices\r\n"
                  "  p                   Print current configuration\r\n"
                  "  m                   Do test measurements\r\n"

        // Take the measurement for the given plug and then schedule a report
        Plug &plug = plugs[event-TASK_MEASURE0];

        scheduler.timer(event, scale_as_int(plug.period));

        measurePlug(plug, 1);
        if(scheduler.idle(TASK_REPORT))

{
    myputs("Current configuration:\n");
    for(byte i=0; i<numPlugs; i++) {
        myprintf("  dev %d: port %d ", i, plugs[i].port);
        Device *dev = getDevice(plugs[i].device_id);
        if(!dev) {
            myputs("(Unknown)\n");
            continue;
        }
        int period = scale_as_int(plugs[i].period);
        myprintf("%s measuring (every %d.%ds): ", dev->name, period/10, period%10);
        for(byte j=0; j<dev->num_measurements; j++) {
            Unit *unit = getUnit(dev->measurements[j].unit);
            if(!unit)
