Grovepi+ and Rpi - Button faulty?

Hello there,

I’m trying to test/ get a button working using grovepi+ and Rpi 3B+ and it appears like both buttons that I have are faulty. Need some help to confirm this please.

Below is the sample code I’m using and the output is attached:

I see all 1’s

@itspramod21 I see you change the pin number. do you hardware connection correct ?

@Baozhu yep… it is connected to the correct pin/ port number.