Making selfmade functions includable in other projects.

In my work to control a CNC machine from a sketch running in an UNO with a stepper shield I have developed some useful functions. It would be nice to save the functions, one by one, and include them in other projects. Can You tell me the steps in the proper direction?

I "select block" and "cut" or "copy" the function from within the Arduino editor and paste the function text into any other text editor. In Windows, Notepad++ is hard to beat.

Save that to a file with a .c or .cpp extension (for example "function.c").

If it is in the directory with your Arduino .ino file, it will automatically show up in a new tab in the Arduino editor. Include function.c into a new sketch using

#include "function.c"

You do this by putting those generally useful functions in a library. Here is a tutorial:

Work through that tutorial and if you get stuck come back and we'll help you out.