I've copied and modified the script in this post with an attempt to create an interval timer.Right now I'm only looking for a beginning and an endding time. Two inputs.A single or a series of push button spring loaded switches are attached to 5V and ground along with PIN 2. I also used a 1K resistor prior to ground.

When I push on the button I get a stream of data from PIN 2.How can I collect just two inputs?

A single or a series of push button spring loaded switches are attached to5V and ground along with PIN 2. I also used a 1K resistor prior to ground.

This description makes no sense. A schematic would be necessary.

Using the internal pullup resistor, and connecting one leg to ground and one leg to the pin would be simpler.

Thanks for the help.This is the simple schematic. I've still got a lot to learn about Arduino. I rely do not understand the concept of a pullup resistor.[among other things]All I want to do is have an arduino become and interval timer. I'm also experimenting with photo resistors and IR.