Contador de 2 dígitos con botón

Debo hacer un contador de 0 a 99 con un par de displays de 7 segmentos de ánodo común y con Arduino UNO.
Los diagramas de como los conecté están adjuntos. El código que estoy usando lo saqué del Arduino Cookbook, combinando la función "debounce" que está en la sección 5.3 y otro código que está en la sección 7.11 que muestra los números en el display.
El problema que tengo, es que si cuenta bien todos pulsos, pero cuando suelto el botón el número deja de aparecer, aunque si guarda el número por el que va la cuenta. Pero el objetivo es que el número se mantenga aunque no lo esté presionando, y que con cada pulso del botón vaya aumentando.
Apreciaría mucho la ayuda, ya que no sé que estoy haciendo mal o qué le falta al código y pues, soy nueva manejando el Arduino.

int value = 0;
const int inputPin = 12; // the number of the input pin
const int ledPin = 13; // the number of the output pin
const int debounceDelay = 50;
const int numeral[10] = {
  //ABCDEFG /dp
  B11111100, // 0
  B01100000, // 1
  B11011010, // 2
  B11110010, // 3
  B01100110, // 4
  B10110110, // 5
  B00111110, // 6
  B11100000, // 7
  B11111110, // 8
  B11100110, // 9
};
// pins for decimal point and each segment
// dp,G,F,E,D,C,B,A
const int segmentPins[] = { 
  4,7,8,6,5,3,2,9};
const int nbrDigits= 2; // the number of digits in the LED display
//dig 1 2 3 4
const int digitPins[nbrDigits] = {
  10, 11};

boolean debounce(int pin)
{
  boolean state;
  boolean previousState;
  previousState = digitalRead(pin); // store switch state
  for(int counter=0; counter < debounceDelay; counter++)
  {
    delay(1); // wait for 1 millisecond
    state = digitalRead(pin); // read the pin
    if( state != previousState)
    {
      counter = 0; // reset the counter if the state changes
      previousState = state; // and save the current state
    }
  }
  // here when the switch state has been stable longer than the debounce period

  if(state == LOW) // LOW means pressed (because pull-ups are used)
    return true;
  else
    return false;

}

void setup()
{
  for(int i=0; i < 8; i++)
    pinMode(segmentPins[i], OUTPUT); // set segment and DP pins to output
  for(int i=0; i < nbrDigits; i++)
    pinMode(digitPins[i], OUTPUT);
  pinMode(inputPin, INPUT);
  pinMode(ledPin, OUTPUT);
}
void loop()
{
  //int value = analogRead(0);


  if ( digitalRead(12) == HIGH)
  { 
    if(debounce(inputPin))
    {
      value = value++; 
    }
    while(digitalRead(12)==LOW){
      showNumber(value);
    }
  }
}



void showNumber( int number)
{
  if(number == 0)
    showDigit( 0, nbrDigits-1) ; // display 0 in the rightmost digit
  else
  {
    // display the value corresponding to each digit
    // leftmost digit is 0, rightmost is one less than the number of places
    for( int digit = nbrDigits-1; digit >= 0; digit--)
    {
      if(number > 0)
      {
        showDigit( number % 10, digit) ;
        number = number / 10;
      }
    }
  }
}
// Displays given number on a 7-segment display at the given digit position
void showDigit( int number, int digit)
{
  delay(2);
  digitalWrite( digitPins[digit], HIGH );
  for(int segment = 1; segment < 8; segment++)
  {
    boolean isBitSet = bitRead(numeral[number], segment);
    // isBitSet will be true if given bit is 1
    isBitSet = ! isBitSet; // remove this line if common cathode display
    digitalWrite( segmentPins[segment], isBitSet);
  }
  delay(2);
  digitalWrite( digitPins[digit], LOW );
}

Muchas gracias por su ayuda!

Este es el montaje que estoy usando.

Pull up.png

counter.png