Adding On/Off Switch

I combined Circuits 1 and 4 of the basic circuits so that I have a blinking light that when it turns off a connected servo will start turning. I want to add a button but am not sure how I would add this to my code at all. Can someone help please? Here is my code without adding a button:

#include <Servo.h>

Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created

int pos = 0; // variable to store the servo position

int ledPin = 13; // LED connected to digital pin 13

void setup()
{
pinMode(ledPin, 13); // initialize the digital pin as an output:

myservo.attach(9); // attaches the servo on pin 9 to the servo object
}

void loop()
{
for(pos = 0; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
}
for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
}

// The setup() method runs once, when the sketch starts

digitalWrite(ledPin, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // set the LED off
delay(1000); // wait for a second
}

You want to add a button? Just stick a button on there. If you want the button to DO something then you need to write code to read the button input and act on its value. If you want us to help you do that, then you should probably tell us what you want this button to DO. It’s really hard to write code to do something if you don’t know what that something is. Please take a few minutes to engage the brain and think about what other obvious details we might need in order to help you.

Also please take a few minutes to read the forum rules “How To Use This Forum”. Pay particular attention to the part about how to properly post code. Right now you are breaking those rules.