Digital input - how to read the state of a button

Lecture contents locked