@Hank on top of Gordon's suggestion with the layout module I would have those suggestions:
Replace your custom time handling with the locale module https://www.espruino.com/Bangle.js+Locale
// Current time, e.g. 15:49 require("locale").time(new Date(), 1); // First drink, e.g. 15:49 require("locale").time(firstDrinkTime, 1);
You have a bunch of assignments like
a = a + 1; b = b - 1;
that can be shortened to
a++; b--;
@fewieden started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@Hank on top of Gordon's suggestion with the layout module I would have those suggestions:
Replace your custom time handling with the locale module https://www.espruino.com/Bangle.js+Locale
You have a bunch of assignments like
that can be shortened to