-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fix #14 add **restart()** function. - add demo for restart **countdown_restart.ino**
- Loading branch information
1 parent
11ba72b
commit 69eedf0
Showing
8 changed files
with
105 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// FILE: countdown_restart.ino | ||
// AUTHOR: Rob Tillaart | ||
// PURPOSE: demo restart | ||
// URL: https://github.com/RobTillaart/CountDown | ||
|
||
|
||
#include "CountDown.h" | ||
|
||
CountDown cdt; // default millis | ||
|
||
uint8_t lines = 0; | ||
|
||
|
||
void setup() | ||
{ | ||
Serial.begin(115200); | ||
Serial.println(__FILE__); | ||
Serial.print("COUNTDOWN_LIB_VERSION: "); | ||
Serial.println(COUNTDOWN_LIB_VERSION); | ||
|
||
cdt.start(10000UL); | ||
} | ||
|
||
|
||
void loop() | ||
{ | ||
// time for a new sample | ||
if (cdt.remaining() == 0) | ||
{ | ||
// restart countDownTimer same values | ||
cdt.restart(); | ||
// make a sample and print it. | ||
Serial.print(millis()); | ||
Serial.print("\t"); | ||
Serial.println(analogRead(A0)); | ||
} | ||
} | ||
|
||
|
||
// -- END OF FILE -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name=CountDown | ||
version=0.3.0 | ||
version=0.3.1 | ||
author=Rob Tillaart <[email protected]> | ||
maintainer=Rob Tillaart <[email protected]> | ||
sentence=Arduino library to implement a CountDown clock in SW. | ||
|