pausing a sketch with a button

I would like a sketch to run up to a point and then wait until a button is actuated to resume and run the rest of the sketch. Any suggestions as to how this could be accomplished in an efficient manner would be appreciated.

sketch sketch while (digitalRead(button) == HIGH ) { // wait for button to connect pin to Gnd when pressed, with pin pulled high // hang out until LOW is read } sketch sketch

Something like this?

while(digitalRead(buttonPin) == HIGH) { } // do nothing until you press a button.

This assumes the button is wired correctly, that is between input and ground and you have enabled the internal pull up resistors.

Edit: beaten to the punch here

Yep, fastest fingers in the west!

Thanks for the help. I will be giving this a try.