From 9e05058a3d2e6965e793859a8133ebf85f83f62d Mon Sep 17 00:00:00 2001 From: Martin Zwigl Date: Sun, 23 Feb 2025 21:37:48 +0100 Subject: [PATCH] :sparkles: countdown app to show something --- apps/coin_info/app.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/apps/coin_info/app.js b/apps/coin_info/app.js index e69de29bb..d6dab15aa 100644 --- a/apps/coin_info/app.js +++ b/apps/coin_info/app.js @@ -0,0 +1,22 @@ +{ + Bangle.loadWidgets(); + Bangle.drawWidgets(); + + function countDown() { + counter--; + + g.clear(); + // draw the current counter value + g.drawString(counter, g.getWidth()/2, g.getHeight()/2); + // optional - this keeps the watch LCD lit up + Bangle.setLCDPower(1); + } + + // call countDown every second + var interval = setInterval(countDown, 1000); + // + Bangle.setUI({ + mode : 'custom', + back : Bangle.showClock, + }); +} \ No newline at end of file