-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a94d6d
commit 2915f67
Showing
9 changed files
with
135 additions
and
30 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
39 changes: 39 additions & 0 deletions
39
libraries/TM1637_RT/examples/TM1637_displayTime/TM1637_displayTime.ino
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,39 @@ | ||
// | ||
// FILE: TM1637_displayTime.ino | ||
// AUTHOR: Rob Tillaart | ||
// PURPOSE: demo TM1637 library | ||
// URL: https://github.com/RobTillaart/TM1637 | ||
|
||
|
||
#include "TM1637.h" | ||
|
||
TM1637 TM; | ||
|
||
uint32_t start, stop; | ||
|
||
void setup() | ||
{ | ||
Serial.begin(115200); | ||
Serial.println(__FILE__); | ||
|
||
TM.begin(7, 6, 4); // clockpin, datapin, #digits | ||
|
||
delay(10); | ||
start = micros(); | ||
TM.displayTime(59, 59, true); | ||
stop = micros(); | ||
Serial.println(stop - start); | ||
} | ||
|
||
|
||
void loop() | ||
{ | ||
uint32_t now = 523 + millis() / 1000; | ||
uint8_t hh = now / 60; | ||
uint8_t mm = now - hh * 60; | ||
bool colon = (millis() % 1000 < 500); | ||
TM.displayTime(hh, mm, colon); | ||
} | ||
|
||
|
||
// -- 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=TM1637_RT | ||
version=0.3.5 | ||
version=0.3.6 | ||
author=Rob Tillaart <[email protected]> | ||
maintainer=Rob Tillaart <[email protected]> | ||
sentence=TM1637 Library for Arduino. | ||
|