Skip to content
/ Timer Public

A Library for Arduino that uses a 4-digit, 7 segment display, driven by a PT6961 chip, that can be used as a Timer or Stopwatch.

License

Notifications You must be signed in to change notification settings

srichs/Timer

Repository files navigation

Timer Build Status

A Library for Arduino that uses a 4-digit, 7 segment display, driven by a PT6961 chip, that can be used as a Timer or Stopwatch. It makes use of the PT6961 Library written by Garrett Blanton.

How to Use

A timer object can be created by passing the pin numbers for the DIN, CLK, CS and Alarm pins of the Arduino.

Timer timer(4, 3, 2, 12);

The Timer can be initialized in two different types: countdown() or countup(), and these methods also start the Timer. The fidelity can be set to two different types: MINUTES or SECONDS. MINUTES sets the timer to the format "HH:MM" and SECONDS sets the timer to the format "MM:SS".

timer.countdown(Timer::Fidelity::SECONDS, 1200);
timer.countup(Timer::Fidelity::MINUTES);

There are three methods that can be used to control the Timer: update(), pause(), and restart(). The update() method will be used to check the time and update the display if needed.

Dependencies

PT6961 Library

About

A Library for Arduino that uses a 4-digit, 7 segment display, driven by a PT6961 chip, that can be used as a Timer or Stopwatch.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages