Do other functions loop as well?

I am still building my understanding of the code and wanted to know something about Functions. I know the void setup() runs a single time, and void loop() runs over and over till power is disconnected, but I can't find info on "when" other functions are executed.

If for instance a sketch went as follows;

void setup() // runs once at beginning

void loop() // runs over and over

void newFunctionOne()

int newFunctionTwo()

void newFunctionThree()

When would the new functions execute? Does the sketch execute the functions in order till the end, then reset back to the beginning of the loop() and do it all again? Or do the added functions need to be referenced in the loop somewhere to determine if/when the new function is executed?

TYIA

Never. You have to call them from either setup or loop, as appropriate.

What you are missing is that every C program has a main() and main for an arduino looks something like this:

main()
{
setup();

while (1) loop();
}

There is some other stuff, too, but this is what counts in this case.

Try this:

void setup() {

  Serial.begin(9600);  // Start COM object
}


void loop() {
  int value;
  
  newFunctionOne();          // Call #1
  value = newFunctionTwo();  // Call #2, but get its return  value and...
  Serial.print("Value = ");  // Show it
  Serial.println(value);
  newFunctionThree();        // Call #3

}


void newFunctionOne()
{
  Serial.println("In One.");
}

int newFunctionTwo()
{
  Serial.println("In Two.");
  return 123;
}

void newFunctionThree()
{
  Serial.println("In Three.");
  Serial.println("=============");
  
}

You may find something useful in planning and implementing a program

…R