76 points · by tosh · 4y ago · 18 comments
npm install -g @kaluma/cli
kaluma flash index.js
This installs kaluma, finds the connected device, uploads the code and runs it. Love this simplicity, sounds like it was made the right way. Is there any posts with benchmarks? Very interested about the timing limits of the event loop implementation such as setInterval(()=>{}, 1); and other cpu heavy stuff like math stuff and pin output change speed from javascript.Just to call out that it isn't a new engine, just a runtime on top of JerryScript (which isn't to diminish it, just to clarify).
In my mind brick also meant unrecoverably dead but it seems the meaning has now drifted to what I wrote above and to access the old meaning one needs to specify "permanently bricked".
As for how to mess up micropython: If you load a main.py that has an infinite loop (common on micro controllers because there is no os) then the board will get stuck in that loop as soon as power is applied and your computer can't get a word in because it's no longer listening. Now you can't upload a fixed main.py with a way to break out of the loop.
To fix you need to hold the button while powering on. This puts in in flash mode and you can reflash micropython. Or in my case, flash a different special firmware that blows away all the .py files I had on there because main.py was still there when I just reflashed micropython the first time.