Programming my desired function to my Arduino

@newbie19, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project :wink: See About the Installation & Troubleshooting category.

You will need to study the state change detection example that comes with the IDE. When a button becomes pressed, you switch the led on, when it becomes pressed again it switches off.

It's a little more complicated than above as you want two presses to switch it off so you need to keep a counter that you set to 0 when the LED is switched on, increment when the LED is on and the state change is detected and only switch the LED of if the count reaches 2.