-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
kwushot
commented
Aug 15, 2018
- Renamed and moved Clock to 7Segment
- Optimized clock refresh
- Add menu with LCD and button support
@@ -0,0 +1,199 @@ | |||
int segA = 1; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you !