• @user96449, you mention in post #9 of above referenced conversation

    Wow, you make it sound so easy...

    Yes, it is so easy... while the thing is running, you need no special tools or skills to inspect and influence things on the micro controller, as I just did in the previous post: you just invoke a function in the console by name - dump() - and its return result is right printed. Or you enter the name of a variable that references a plain scalar, simple or complex object or structure - players - , it is right away dumped into the console. players is an array of objects, of which some properties are arrays of numbers. Without adding anything, the information is display with structure visible in the console. And if you want to change a value, for example player 1's race pos, you just assign it with an JavaScript expression / statement in the console: players[1].reacePos = 4;. And for sure, also updating the board works and goes like this: setBoard()... and this is just the tip of the ice berg of easy ness. Espruino has also a built-in single step debug function that allows you to go step by step thru the code and inspect and set/change what you want to change.

    Why and how does it work: The Espruino board does all the heavy lifting with its JavaScript interpreter. The console in the IDE is only a terminal to the micro controller. Any thing you enter is consumed by the JavaScript interpreter, and if it is a valid expression / statement, it is executed.

    You can even add code. For example to get which player is leading in the race, you enter - in one or on multiple lines:

    return (r===null) ? p : (r.racePos>=p.racePos)? r : p; },null); } Then you can use theraceLeader()``` function. Changing code goes the same way...

    As you see, Espruino gives you a lot for what you wan to do....

About

Avatar for allObjects @allObjects started