Intrupt attachment and delay

Hello gys I want to attach an intrupt button to arduino to do work like this…suppose i run program to turn on led upto 5 second command send via bluetooth and suddenly i realize i don’t wanna do i just send some commnd it avoid that delay and stop running programming…plz help and thanks in advance…

That's not what interrupts do. An interrupt would run a very short piece of code and then go right back to your code where it left off. Button presses are slow. Interrupts are for things that are fast.

Instead, you need to get the delay function out of your code. Use the "Blink Without Delay" style of timing. That way the loop function can always be checking the button and can stop whatever it is that you want to stop doing as soon as you press the button. Don't write "Blocking Code" (That's a good term to google)

BTW: Try to have a little bit of respect for the pros you are coming to for FREE help. Sentences start with capital letters and have punctuation at the end. You're not texting your boyfriend, you're asking programmers for help. We would appreciate if you could do us the small respect of writing something readable.

Ok sir I understand. Actually I'm new on this fourm. This is my first update.