Table of Contents

ItimerStart()

ItimerStart() starts the configured callback timer.

ItimerStart command operation flow

bool ItimerStart()
bool ItimerStart(uint8_t timerNumber)

Commands

Command Arguments Return Value Operation
ItimerStart() None bool Starts the configured callback timer.

Example

This uses the default callback timer (Timer2). The callback changes only a flag; serial output runs in loop().

volatile bool tick = false;
 
void onTimer() {
  tick = true;
}
 
void setup() {
  Serial.begin(115200);
  if (!ItimerSet(1000, onTimer)) return;  // Configure the callback and interval first.
  if (!ItimerStart()) return;  // Start the configured default callback timer.
}
 
void loop() {
  if (tick) {
    noInterrupts();
    tick = false;
    interrupts();
    Serial.println(F("tick"));
  }
}

Precautions

Built-in Commands in the Same Category

← Built-in Command List