I tried it out. My only thought would be to make the full screen version a settings option.
To implement sunrise and sunset take a look at the code in the sunrise / sunset clock_info app.
(function() {
// get today's sunlight times for lat/lon
var sunrise, sunset, date;
var SunCalc = require("suncalc"); // from modules folder
const locale = require("locale");
function calculate() {
var location = require("Storage").readJSON("mylocation.json",1)||{};
location.lat = location.lat||51.5072;
location.lon = location.lon||0.1276; // London
date = new Date(Date.now());
var times = SunCalc.getTimes(date, location.lat, location.lon);
sunrise = times.sunrise;
sunset = times.sunset;
/* do we want to re-calculate this every day? Or we just assume
that 'show' will get called once a day? */
}
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.
I tried it out. My only thought would be to make the full screen version a settings option.
To implement sunrise and sunset take a look at the code in the sunrise / sunset clock_info app.
https://raw.githubusercontent.com/espruino/BangleApps/master/apps/clkinfosunrise/clkinfo.js