Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added LCD, buttons and menu #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Added LCD, buttons and menu #2

wants to merge 3 commits into from

Conversation

kwushot
Copy link
Collaborator

@kwushot kwushot commented Aug 15, 2018

  1. Renamed and moved Clock to 7Segment
  2. Optimized clock refresh
  3. Add menu with LCD and button support

@@ -0,0 +1,199 @@
int segA = 1;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore this file. I just renamed it from Clock. And it needs to be in a folder as the file enforced by the IDE.


bool buttonPressed(int button) {
bool pressed = false;
while (digitalRead(button) == LOW) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better without while loop to avoid blocking main thread from loop

return;
}

long now = millis() / 1000;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to have a separated function like displayTime

Copy link
Owner

@evanlwj evanlwj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants