Tiles explained for use with UpdateDisplayArea #1367
Unanswered
Blokhuizen
asked this question in
Q&A
Replies: 1 comment
-
I do not understand the code. Executing updateDisplayArea after sendBuffer does not make sense. If you need a blinking minutes, then just draw everything, wait for some time and again draw everything without minutes, again wait some time and then again redraw everything. void draw(int isMinutes, int isHour, int isColon )
{
drawUpperLeftBell();
drawAlarm();
if ( isHour ) drawHour();
if ( isColon ) drawColon();
if ( isMonutes) drawMinutes();
...
sendBuffer();
] Now you can blink minutes with: for(;;)
{
draw(1,1,1);
delay(100);
draw(0,1,1);
delay(100)
} For blinking hours, just change the flag: for(;;)
{
draw(1,1,1);
delay(100);
draw(1,0,1);
delay(100)
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm struggling with the UpdateDisplayArea and hope you can help.
The project I'm working on is a alarm-clock.
To set the alarm-time, I'm using a rotary button (which is working fine).
When you click the button, the Hour number has to blink. Turning the button will in- or decrease the number, entering the button again the Minutes has to blink.
When the time has been set, the AM/PM has to blink.
See code below, (it's just testing code !!) for updating the area's.
I've managed to determine the Tile positions and format for the Hour and Minute, but I'm unable to find the correct settings for the AM/PM.
How can I calculate the proper Tile positions and dimensions (in Tiles) for the data on the screen?
And, maybe there is a better way to create blinking "texts" ?
`void DrawTime(bool SetHour, bool SetMinute,bool SetAMPM)
{
}
`
Beta Was this translation helpful? Give feedback.
All reactions