Skip to content

About

Generic Interface to Teensy Timers

Topics

Resources

Stars

90 stars

Watchers

12 watching

Forks

Repository files navigation

PlatformIO Registry arduino-library-badge GitHub release Documentation License: MIT

TeensyTimerTool

TeensyTimerTool provides a common, easy to use interface to the hardware timers of the PJRC Teensy boards (GPT, TMR, PIT and RTC on Teensy 4, FTM on Teensy 3) and to up to 20 software timers, which are available on every Teensy. Every timer can be used as periodic or as one-shot timer, with periods given in microseconds or with units (250ms, 1.5s). Callbacks can be plain functions, lambda expressions or functors.

#include "TeensyTimerTool.h"
using namespace TeensyTimerTool;

PeriodicTimer t1; // takes the next free timer

void setup()
{
    pinMode(LED_BUILTIN, OUTPUT);
    t1.begin([] { digitalToggleFast(LED_BUILTIN); }, 250ms);
}

void loop()
{
}

Documentation

  • Manual: getting started, usage, choosing a timer, callbacks, configuration, complete API reference
  • Upgrading from 1.4: changes in version 1.5
  • Changelog: the changes of all versions since 0.1.0
  • Examples: every example folder contains a README explaining what the example shows
  • Forum thread on the PJRC forum

Supported boards

Teensy 4.0, 4.1, MicroMod, Teensy 3.0 … 3.6 and Teensy LC (software timers only). Teensy 3.x and LC are in maintenance mode: bugs are fixed, new features are added for Teensy 4 only.

Requires Teensyduino 1.59 or later. For Teensyduino 1.58 and earlier, use TeensyTimerTool 1.3.0.

Installation

  • Arduino IDE: Library Manager, search for TeensyTimerTool
  • PlatformIO: lib_deps = luni64/TeensyTimerTool

License

MIT, see LICENSE.

About

Generic Interface to Teensy Timers

Topics

Resources

Stars

90 stars

Watchers

12 watching

Forks

Releases

Packages

Contributors

Languages