-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from hwiguna/CYD-RollingClock
Initial
- Loading branch information
Showing
5 changed files
with
468 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.pio | ||
.vscode/.browse.c_cpp.db* | ||
.vscode/c_cpp_properties.json | ||
.vscode/launch.json | ||
.vscode/ipch | ||
creds.h |
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,66 @@ | ||
#include "Digit.h" | ||
|
||
Digit::Digit(int value) | ||
{ | ||
m_value = value; | ||
m_newValue = value; | ||
m_frame = 0; | ||
} | ||
|
||
int Digit::Value() | ||
{ | ||
return m_value; | ||
} | ||
|
||
int Digit::Value(int value) | ||
{ | ||
m_value = value; | ||
m_newValue = value; | ||
return m_value; | ||
} | ||
|
||
int Digit::NewValue() | ||
{ | ||
return m_newValue; | ||
} | ||
|
||
int Digit::NewValue(int newValue) | ||
{ | ||
m_newValue = newValue; | ||
return m_newValue; | ||
} | ||
|
||
int Digit::Frame() | ||
{ | ||
return m_frame; | ||
} | ||
|
||
int Digit::Frame(int frame) | ||
{ | ||
m_frame = frame; | ||
return m_frame; | ||
} | ||
|
||
int Digit::Height() | ||
{ | ||
return m_height; | ||
} | ||
|
||
int Digit::Height(int height) | ||
{ | ||
m_height = height; | ||
return m_height; | ||
} | ||
|
||
void Digit::SetXY(int x, int y) | ||
{ | ||
m_x = x; | ||
m_y = y; | ||
} | ||
|
||
int Digit::X() { return m_x; }; | ||
int Digit::Y() { return m_y; }; | ||
|
||
Digit::~Digit() | ||
{ | ||
} |
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,27 @@ | ||
|
||
class Digit | ||
{ | ||
private: | ||
int m_value; | ||
int m_newValue; | ||
int m_frame; | ||
int m_height; | ||
int m_x; | ||
int m_y; | ||
|
||
public: | ||
Digit(int value); | ||
~Digit(); | ||
int Value(); | ||
int Value(int value); | ||
int NewValue(); | ||
int NewValue(int newValue); | ||
int Frame(); | ||
int Frame(int frame); | ||
int Height(); | ||
int Height(int height); | ||
void SetXY(int x, int y); | ||
int X(); | ||
int Y(); | ||
}; | ||
|
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,5 @@ | ||
# CYD ROLLING CLOCK | ||
This example shows a digital clock with a rolling effect as the digits change. | ||
Most of the code are borrowed from other examples. Thanks Internet! | ||
|
||
You will have to modify the PREFERENCES section in RollingClock.ino to your WiFi and TimeZone. |
Oops, something went wrong.