PollingTimer (community library)


Name Value
Name PollingTimer
Version 1.3.0
Installs 13775
License Apache 2
Author dgarrett@acm.org
URL the URL of the project, like https://github.com/DonGar/PollingTimer
Repository git repository for the project, like https://github.com/DonGar/PollingTimer.git
Download .tar.gz
All Versions 1.3.0, 1.2.0, 1.1.0, 1.0.0

A simple software timer implemetion. Does timeouts, intervals, and debouncing.

Example Build Testing

Device OS Version:

This table is generated from an automated build. Success only indicates that the code compiled successfully.

Library Read Me

This content is provided by the library maintainer and has not been validated or approved.


A Particle library for PollingTimer


Simple timer to track how much time has passed in milliseconds that is overflow safe. It has start/stop/expired support, interval alert support, and easy debounce support.

This library should work with any Arduino, but the examples are written for the Particle Photon.

#include "PollingTimer.h"

PollingTimer timer(100);
PollingTimer interval(50);
Debouncer debounce(10);

void setup() {


void loop() {
if (timer.expired())
Serial.print("100 milliseconds have passed!");

if (interval.interval())
Serial.print("50 milliseconds, repeating.");

if (debounce.debounce(digitalRead(D0)))
Serial.print("Button pushed.");

See the examples folder for more details.


TODO: Describe PollingTimer


It's available at github.com/DonGar/PollingTimer.

Please feel free to send me pull requests.


Copyright 2017 dgarrett@acm.org

Licensed under the Apache 2 license.

Browse Library Files