Espruino – An open JavaScript microcontroller
espruino.com
espruino.com
Edit: I was having a bad day, and this comment was over the top. I don't like the current trend of everything should be implemented in JavaScript, but respect what Espruino are trying to do.
EDIT: I also need to stress that "embedded" doesn't imply that a system is particularly limited in resources.
This is not for mass production, or for productization. This is for playing "Jingle Bells" and then sending a tweet whenever someone rings your doorbell.
It enables people who happen to be comfortable in JS most to do some accessible electro hacking. Seriously, how is that awful?
Are you also going to complain that Lego Mindstorms is awful because people shouldn't make industrial robots with it?
Embedded platforms are evolving at an incredible pace, in some cases outperforming PC's from just a few generations ago. There is more than enough headroom to make interpretation a viable model for micro controllers, and there is hardly a better way to make the technology more accessible to beginners. Granted, JavaScript would not be my choice either - but to say that interpreted languages aren't an option is ridiculous.
Making tech accessible to beginners is a fair point.
But I don't really buy the headroom argument: There's always the case to use as few resources as possible when it comes to embedded (the micro controller kind of stuff): Power usage. The less overhead your software stack creates the less power your always on/battery powered device will consume.
And as long as I am not forced to use JavaScript I don't really care if people use it to do things that it wasn't intended to do in the first place.
1. Using callbacks as commonly done in javascript, might offer a very easy to use way to write low power code(because the chip can automatically sleep between callbacks). This is nice versus today's high complexity low power design.
2. The author used regular mcu for this board. But low-power mcu needs orders of magnitude less power. And of course low-power pcb design can save even more.
Combining the 2 together, maybe we can see a good enough option for building 1st version, low-power products(say kickstarter guys) where they can spend a bit more on chips and there's less competition on specs - but things like low cost of development, time to market, and high domain knowledge with less technical knowledge are important qualities.
Do not ever justify having high standards. ;)
[1]: http://dept-info.labri.u-bordeaux.fr/~strandh/Teaching/Langa...
It's really good to see a decent discussion here...
For me, it's about getting the right tool for the job. I'm mainly a C programmer, but if I want to manipulate a bunch of files I probably won't use C, I'll use Bash.
In the same way there are (a lot of) times when what you actually want to do with hardware is quite simple, but you'd end up writing a whole bunch of C code to accomplish it - and that's where Espruino will not only be faster, but a lot more fun :)
Someone also mentioned power consumption/events and I thought I'd give you some figures. When Espruino sleeps between events (which is does automatically) it draws ~50uA. Even with explicit power management calls, pretty much all Arduino boards draw at least 5mA (so 100 times more), and without explicit calls it'll be 20-30mA. Raspberry Pi is anywhere from 100-500mA, so over 2000 times more power.
The trend to on board interpreters is interesting. The whole JS thing with Beaglebones was my first experience with it. Back in the stoneage there were Handiboards with a version of C that was interpreted on the board. And I've built over a dozen robots with boards that ran BASIC of one flavor or another. Personally if you're going with the STM32 chips anyway I expect Micropython is a better starting point.
The amount of computing power that's now available in embedded systems is just amazing.