Thymio in Playground: native function to load a bytecode
See aseba-community/aseba-target-thymio2#17, suggesting a new native function _bytecode.load(n)
that resets the VM and loads a bytecode numbered n
into memory. This function could first be implemented in the simulator.
The playground XML file must be extended to include an element containing numbered, BASE64-encoded bytecodes.
The existing thymio2
, e-puck
, etc. elements could by extended to specify an initial bytecode to run. Otherwise bytecode 0, if it exists, could be assumed for every target node.
This functionality could be used to simulate the initial menu behavior of the physical Thymio-II, providing an even more realistic experience.