Button skiping while loop

Hi guys i have little prob. with my project. I m using hile loop to delay printin text afther a welcome screan. But something has to be wrong bcs text 'll get printed afther few sec anyway eaven tho button was nerver pressed. Any idea why s that?

Here is code:

//#include <Wire.h> 

#include "mastermind.h"
#include "lcd_wrapper.h"

//int secret_code=generate_code();

void setup() {

  lcd_init();
  start_printin();

}

void loop() {

}

void start_printin(){
   lcd_print_at(3, 0,(char*)"Welcome to");
   lcd_print_at(3, 1,(char*)"MasterMind");
   while (true) {// until enter is pressed welcome will stay printed
    delay(100);
    if (digitalRead(BTN_ENTER_PIN) == HIGH) {
      break;
    }
  }
   //delay(4000);
   lcd_clear();
   lcd_print_at(0, 0,(char*)"Your goal is to");
   lcd_print_at(0, 1,(char*)"guess my secret");
   delay(3000);
   lcd_clear();
   lcd_print_at(2, 0,(char*)"combination");
   //lcd_print_at(2, 1,(char*)"combination.");   
}

And here are definitions from my .h file

#ifndef _MASTERMIND_H
#define _MASTERMIND_H

#define BTN_1_PIN       2
#define BTN_2_PIN       3
#define BTN_3_PIN       4
#define BTN_4_PIN       5
#define BTN_ENTER_PIN   A0

#define LED_BLUE_1      6
#define LED_RED_1       7
#define LED_BLUE_2      8
#define LED_RED_2       9
#define LED_BLUE_3      10
#define LED_RED_3       11
#define LED_BLUE_4      12
#define LED_RED_4       13

Is BTN_ENTER_PIN your own invention, or is it supported by the library/ies ?
It could be you are missing a pullup/pulldown resistor, depending on how you wired the button.

6v6gt:
Is BTN_ENTER_PIN your own invention, or is it supported by the library/ies ?
It could be you are missing a pullup/pulldown resistor, depending on how you wired the button.

it's practicly "my invention" but it should work bcs my friend is using same .h and .cpp files as i do and its working properly and only diference is that he is using that while elsewhere.

and its wired properly too bcs buttons worked when i tested tham sepretly. so idk why this loop is ...

OK. You should show a schematic.

The reason I asked if it was supported by the library was that (a) the library designer would have specified how the button should be wired and (b) used the appropriate pinMode() statement for it in the library.

You are missing a pinMode() statement i your code and you have not said what pullup/pulldown resistors you are using (if any).

Usually, a button is wired on the low side and the pin's built in pullup resistor is used. The effect that you have described is that of a floating input pin.

here is the schematic of wiring Screenshot by Lightshot

and yes im using pin mode in lcd_init()

void lcd_init(){
lcd.init(); // initialize the lcd
//lcd.init();
// Print a message to the LCD.
lcd.backlight();

pinMode(BTN_1_PIN, INPUT);
pinMode(BTN_2_PIN, INPUT);
pinMode(BTN_3_PIN, INPUT);
pinMode(BTN_4_PIN, INPUT);
pinMode(BTN_ENTER_PIN, INPUT);

pinMode(LED_BLUE_1, OUTPUT);
pinMode(LED_RED_1, OUTPUT);
pinMode(LED_BLUE_2, OUTPUT);
pinMode(LED_RED_2, OUTPUT);
pinMode(LED_BLUE_3, OUTPUT);
pinMode(LED_RED_3, OUTPUT);
pinMode(LED_BLUE_4, OUTPUT);
pinMode(LED_RED_4, OUTPUT);
}

if u want i can include .h files