Good plan - I'm not sure s1 gets set up? You could actually do:
let s1 = (n&1)?1:-1, s2 = (n&2)?1:-1;
and remove the whole switch
switch
I've just updated the app loader to allow local modules for you: https://github.com/espruino/BangleApps#modules
So add the module in modules/, then reference it from your code as just require("mymodule") and you should be good.
modules/
require("mymodule")
@Gordon 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.
Good plan - I'm not sure s1 gets set up? You could actually do:
and remove the whole
switch
I've just updated the app loader to allow local modules for you: https://github.com/espruino/BangleApps#modules
So add the module in
modules/
, then reference it from your code as justrequire("mymodule")
and you should be good.