Button connection diagram.
Block Digital input Pin 2. The block uses the internal resistance of the microcontroller!
Let's send the value of digital pin 2 to the Port Monitor.
Sample program:
Download example: file.ardublock | Open Online ArduBlock
Video: