Watchface Ideas

Posted on
Page
of 5
First Prev
/ 5
  • Good point. That would work perfectly if I could use my code snippet, or save it as a jpg, in place of the sunset.

  • Just a note that a slidey clock got mentioned in https://forum.espruino.com/comments/1632­8196/ and it's now available at https://banglejs.com/apps/?id=slopeclock­

  • @Gordon, I saw that! It's awesome to see more and more getting coded. I'm excited to see the next 2 years of the Bangle!

  • 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.

  • Here it is.


    1 Attachment

    • PXL_20230507_062316667~3.jpg
  • Nice idea, thanks! How about adding it to http://www.espruino.com/Bangle.js+App+Lo­ader ?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Watchface Ideas

Posted by Avatar for andiohn @andiohn

Actions