scketch in scketch

arduino123456789:
Can any give a example or tell how to do this please?

The demo I wrote in the first post in this Thread shows how a program can be built up from several small functions. One of them is triggered by a switch. The demo also illustrates the use of the technique in the Blink Without Delay example sketch to time various things with using the delay() function.

...R