Debouncer Circuit & Button as input

Hi everyone,
My project requires input from buttons and I have setup a debouncer circuit according to Arduino’s Debouncer tutorial ( Also my Arduino code is as follows. Why is it that sometimes Arduino detects multiple inputs from the button even when I just click it once and sometimes it detects only one input?

int read_button(){
  // read the state of the pushbutton value:
  buttonOne = digitalRead(button_1);
  buttonTwo = digitalRead(button_2);
  buttonThree = digitalRead(button_3);

  // check if the pushbutton is pressed. If it is, the buttonState is HIGH:
  if (buttonOne == LOW && buttonTwo == LOW && buttonThree == LOW){
    return 4;
    if (buttonOne == HIGH) {
      return 1;
    else if (buttonTwo == HIGH){
      return 2;
    else if (buttonThree == HIGH){
      return 3;

void loop(){

void fsm(){
  int button = read_button();
  if (button <= 3 && button >= 1){
    update_screen = true;
  if (button_last != button){
   if (update_screen == true){
     Serial.println (button);
   update_screen = false;
  button_last = button;

You need to read the tutorial again. That is not a debounce circuit. The debouncing is done in the code provided in the tutorial. Your code doesn't do any debouncing and that is why you're detecting multiple button presses.

It is possible to do debouncing in hardware instead of software if you prefer.