     handler.registerCommand("OPEN", open);
     handler.registerCommand("CLOSE", close);
     handler.registerCommand("STOP", stop);
+    handler.registerCommand("SETSPEED", setspeed);
 
     taskScheduler.init();
     taskScheduler.addTask(motorTask);


    switch (phase) {
        case RAMP_UP: {
            int power = FULL_SPEED * countSincePhase / RAMP_LENGTH;
            if (power > FULL_SPEED)
                power = FULL_SPEED;
            motorShield.setM1Speed(power * direction);
            if (power == FULL_SPEED)
                phase = MOVE_UNTIL_NEAR;
            break;
        }
        case RAMP_DOWN: {
            int power = FULL_SPEED - FULL_SPEED * countSincePhase / RAMP_LENGTH;
            int minimumPower = (roofState == CLOSING ? CLOSING_SPEED : 0);
            if (power < minimumPower)
                power = minimumPower;

        roofState = STOPPING;
        phase = RAMP_DOWN;
        // start mid-ramp if we were not running at full speed
        countSincePhase = RAMP_LENGTH - RAMP_LENGTH * motorShield.getM1Speed() / roofSpeed;
    }
    if (roofState == ERROR) {
        roofState = STOPPED;
