          case IDX_REG_LED1:
          case IDX_REG_LED2:
             if (pos == 0 && len == 1) {
+
                int pin = reg == IDX_REG_LED1 ? PIN_LED1 : PIN_LED2;
                if (data[0]) {
                   digitalWrite(pin, HIGH);

            } else {
               return SRDP_ERR_INVALID_REG_POSLEN;
            }
         default:
            return SRDP_ERR_NO_SUCH_REGISTER;
      }

         case IDX_REG_BTN1:
         case IDX_REG_BTN2:
            if (pos == 0 && len == 1) {
               
               if (reg == IDX_REG_BTN1) {
                  data[0] = btn1.getState();
               } else {
