How do I stop an Arduino sketch?

you can do what you want in the "Setup" if you want to do it only once.