Skip to content

Commit 62dfb6f

Browse files
committed
added first watchface example
1 parent be3ef79 commit 62dfb6f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
void setup() {
2+
fullScreen();
3+
frameRate(1);
4+
textFont(createFont("Roboto", 48));
5+
fill(255);
6+
}
7+
8+
void draw() {
9+
background(0);
10+
translate(0, +insetBottom/2);
11+
if (!ambientMode) {
12+
String str = hour() + ":" + minute() + ":" + second();
13+
float w = textWidth(str);
14+
text(str, (width - w)/2, height/2 + 24);
15+
}
16+
}

0 commit comments

Comments
 (0)