What about if you want to find out what the Arduino is doing? You can communicate with it using the Serial Monitor.
In this example, use an Digital pin as an input to detect when a button is pressed.
When the button is pressed the input value changes from 0 (LOW) to 1 (HIGH) and you can write this value to the Arduino's serial port.

