-
• #102
Just a note that a slidey clock got mentioned in https://forum.espruino.com/comments/16328196/ and it's now available at https://banglejs.com/apps/?id=slopeclock
-
• #103
Nm
-
• #104
I finally have the code for my Existentialist's Watch. The watchface shows the word "Now" in the center of the screen. If you find a need for the terrestrial time, press the button and the current time will display for five seconds, then revert back to "Now".
// Display the "Now" message on the Bangle.js 2 watch function showNow() { g.clear(); g.setFontAlign(0, 0); g.setFont("Vector", 48); g.drawString("Now", g.getWidth() / 2, g.getHeight() / 2); return true; } // Display the current time on the Bangle.js 2 watch function showTime() { // Get the current time var date = new Date(); var hours = date.getHours(); var minutes = date.getMinutes(); // Format the time as a string var timeString = hours.toString().padStart(2, "0") + ":" + minutes.toString().padStart(2, "0") + ":" +; // Display the time on the screen g.clear(); g.setFontAlign(0, 0); g.setFont("Vector", 42); g.drawString(timeString, g.getWidth() / 2, g.getHeight() / 2); // Revert to the "Now" display after 5 seconds setTimeout(showNow, 5000); } // Set up a button listener to display the time setWatch(showTime, BTN1, { repeat: true }); // Display the "Now" message on start-up showNow();
It's simplistic, no widgets and such, but I'm sure somebody will jazz it up if they want.
This is the main reason I bought the Bangle.js 2. So happy now. -
• #105
Here it is.
1 Attachment
-
• #106
Nice idea, thanks! How about adding it to http://www.espruino.com/Bangle.js+App+Loader ?
Good point. That would work perfectly if I could use my code snippet, or save it as a jpg, in place of the sunset.