EDIT: See @MaBe solution in #2 post to conditionally select during development
The basic idea:
// Note: save() must be entered at least once before this will take effect
E.on( 'init', function() {
setTimeout( function() {
console.log( "Hello World!" );
}, 1500 );
});
// or
// Will get called automatically
function onInit() {
}
An excellent read with usage examples, the entire article:
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.
Fri 2020.01.17
While I can not take any credit for these examples, having a launching point is needed to save precious moments supporting our Espruino community.
These individuals were cranking out init code solutions two years before I could spell Espruino:
@Ollie post #2
@MaBe post #3
@Gordon post #4
@allObjects post #8 his 0.02 worth
and a must read post #18 two more 0.02 worth
The basic idea:
An excellent read with usage examples, the entire article:
a must read explanation
and another @allObjects gem