LCD 16x2 digital read buttons

Dear Arduino Friends,

I have a short problem. I’m not very good at programming but i want to learn it.

My problem is, i want to show a value which depends on a button value. I have tried to write a sketch by my own. but the value isn’t shown clearly the value (ein/aus) jumps till i press the button, when i press the button it works still fine but when i dont press the button the value jumps.

here is my sketch and a picture of my projekt plan.


Wenn möglich bitte in Deutsch antworten,( mein englisch ist nicht wirklich ausgereift)

Programm0.0.ino.ino (2.43 KB)

It is not clear on your diagram how the ground from the Uno is connected to the breadboard. There are no external pullup or pull down resistors on the buttons and you have not used the internal pullup resistors by defining these in the pinMode() function. That means input pins will float and cause unpredictable results.