how to use the tabs

Hi im planning to write a very long complex program to run an led display. The display is like an lcd but not quite so the liquid crystal library wont work. Now to display lets say an “A” on the display you have to find what pins should be high and which should be low to make the display. But when writing a word it could get very confusing and very long with all the digitalWrites(); so I was wondering how I would take the digitalWrites(); from the main sketch and put them into different tabs? I have not written my code and was confused on how to go about solving my problem any thing will help, thanks.

Here is an example. This is the subroutine sketch code. Note no setup or loop functions. I would save this as myBlink.

void myBlink() {

Then the main sketch code

void setup() {

void loop() {

After you enter this sketch, go to Sketch in the toolbar and select "add file", then find and select myBlink (the first code you entered). It will appear as a second tab, and you will be able to call the myBlink routine from your main sketch.

edit: I forgot to set pin 13 as an output. Corrected.

ok thank you