• @KevinJ, you are right that in the docs the simple example code doe somewhat solicit a practice that then fails on larger applications. Initially though, I'm sure @Gordon had in mind it would work all the way thru, because last but not least, he went thru all the hoops to save the system's state down to the configuration and active timeouts, intervals, and watches. As said, with small things and simple one-time initializations this works all just fine... Complicating the examples is not the answer, but doing nothing either. May be adding a page with multiple things that need initialization and initializations with dependencies and adding a link in the simple examples to that page would be nice. All Espruino sub projects - including the documentation - is on github... you can clone it, make additions and enhancements and ask for merge requests.

    May be you came across the conversation about simple explanation how to save code that espruino run on start?, where pist #8 and #18 contribaute 2 times 2 cents about code life cycle in Espruino environment.

    Espruino programming concept is quite different from Arduino... even though deep under the hood both work with events, but only Espruino brings it 'easy' (easier?) to understand into the application realm.

    Coming from Browser / JavaScript programming with interfacing with DOM and XHTML Request and Sockets, Espruiono is not much different. It is just not common place to have such a high-level and easy-going language available to deal with micro controller hardware.

About

Avatar for allObjects @allObjects started