6 ms·
Espruino -- a JavaScript Arduino
- themstheones 13y agoShould've called it Ecmuino.
- jgrahamc 13y agoUnfortunate that they used a name ending in 'uino' since this is in no way an Arduino and not compatible with Arduino in terms of code or pin out. So no existing code or examples will work with it and none of the exiting Arduino shields. Also, I think their code examples are disingenuous: their Arduino code could be greatly simplified. (e.g. why does the JavaScript code not include any port initialization but the Arduino code does; why have two digitalWrites in the Arduino code, but one in the JavaScript)?
- exDM69 13y ago> Unfortunate that they used a name ending in 'uino' since this is in no way an Arduino and not compatible with Arduino in terms of code or pin out. I agree with you about the name. This pinout, however, is very different from the Arduino because this thing has a lot more pins than the Arduino has. And the pinout of the normal Arduino is really annoying, because there's a non-standard half-pin width gap between two of the headers on the Arduino. But prefabricated Arduino shields are really popular and supporting them would be a really good idea.
- zokier 13y agoSeems like the project started on Olimexino board, which has the Arduino layout, and that's where the name probably comes from. Why they didn't keep the layout is beyond me. http://www.youtube.com/watch?v=WP2Wo2_RVgo http://www.youtube.com/watch?v=WP2Wo2_RVgo https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/ https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/
- gfwilliams 13y agoHi, I'm the guy behind it... Just wanted to stand up for it a bit - the -uino postfix is really because of the hobby electronics association. I wanted to do something a bit different by adding the prototype area, and I found the Arduino form factor was too big for any sensible hand-held projects. The board is still small enough that it can sit on a simple adaptor PCB for Arduino shields though. I'll try and put one online when the campaign ends. Also port initialisation is automatic so pinMode is not required - it's a huge potential gotcha for learners, and it seemed wise to remove the need for it. You can still use it if you want to though.
- zeckalpha 13y agoHow does this compare to Tessel? http://technical.io/ http://technical.io/ Can you merge your efforts? Good luck!
- gfwilliams 13y agoThanks! As I understand it, Tessel uses a version of node.js (and probably Linux underneath) so it needs around 32mb of RAM (and quite a lot of Flash too). I've worked pretty hard to get Espruino running in 8kb (with space for variables) so that it can run on a single cheap IC (without external RAM). I think they probably serve quite different markets. I figure Tessel are aiming to provide more of an ecosystem? If I'm honest I think they've got a bit of a fight on their hands against Raspberry Pi/Beaglebone with node.js installed, so I'd guess they're going for some kind of added value. On the other hand, Espruino's aiming more where the Arduino is. Low power, where you want to play with LEDs or automate a project you've made, and you want the instant gratification of using an interpreter.
- aberkowitz 13y agoThe "-uino" suffix is pretty blatantly associated with the arduino platform. To go out there and claim you're using it for the "hobby electronics association" is pretty disingenuous.
- jpwright 13y ago
- exDM69 13y agoIs this really a good idea? Yes, JavaScript is popular but if you're running on a microcontroller and already short of resources, is it really worth it to spend a lot of your cycles interpreting JavaScript? A lot of microcontroller code has some real time requirements. Even some of the simplest Arduino code out there. Even in beginner projects, it is rather common to do something like software debouncing for pushbuttons or multiplexing for led matrices, both of which require millisecond resolution timing precision. A garbage collector pause in the middle of it would ruin everything. And a noob wouldn't understand why. Also, isn't JavaScript already running on the new ARM Cortex M3 -based Arduino board? To say something positive, I think the Google Blockly visual programming language is a very good idea for something like this, especially if targeted at noobs and/or kids. If you're unfamiliar with it, the picture with the puzzle pieces tells it all. There are puzzle pieces of different shapes for different syntactic structures (you can see expression and statement pieces), and the colors of the pieces are different types (in the picture, green is a boolean, I think).
- outside1234 13y agoMost JavaScript runtimes no longer interpret JavaScript. It is compiled to bitcode and some subsets(see asm.js) can run within reach of native code.
- exDM69 13y ago> Most JavaScript runtimes no longer interpret JavaScript. Yes, JavaScript implementations have been more or less JIT-compiler based for quite some time now. But they are still quite far behind in performance and this does not address the real time requirements at all (in fact, it makes it worse). There's also a significant memory hit from having the JIT compiler around. Asm.js is cool because it can be compiled to native code ahead of time (addresses the performance gap at the expense of startup time), but this project isn't talking about Asm.js at all. It's about running human-written JavaScript as opposed to Asm.js which is intended to be emitted by compilers.
- dubcanada 13y ago
- outside1234 13y agoI think this is a little bit off. What I want is an embedded device that runs node.js and npm, not just JavaScript. That enables you to use JavaScript and C (using a native npm module) and get the best of both worlds.
- neya 13y agoI think Beaglebone Black already does that. Please correct me if I'm wrong? Also, it has an embedded micro-controller inside making it a fantastic piece of hardware.
- neon_electro 13y agoPerhaps you're looking for something like this? http://technical.io/ http://technical.io/
- deleted 13y ago[deleted]
- gfwilliams 13y agoThere's Beaglebone, Raspberry Pi, and also now Tessel that do that. The previous two have had node.js support for ages but I think have been lacking any kind of real advertising because they're more general purpose. All of those appear to be fully-fledged computers though, and Espruino's not really aiming to compete with them. Instead, you get to use JavaScript on a very small, low-power microcontroller than will sensibly run off a small battery for days on end. Some people will want one thing, some will want another - and hopefully they can both coexist. If we get it right they'll both help each other and we can end up with a large library of JavaScript code for embedded devices :)
- angersock 13y agoEcmaboard, or CallbackCard would've been more fitting. Maybe $Board.
- rglover 13y agoPledged to get a board. Looks like it would be fun to play with.
- codereflection 13y agoHow is this any different from running Johnny-Five (https://github.com/rwaldron/johnny-five https://github.com/rwaldron/johnny-five) on an Arduino? Do we really need a board dedicated to JavaScript? There are SO many Arduino compatible boards out there already...
- gfwilliams 13y agoJohnny-Five requires a PC (it runs JavaScript on the host computer). On Espruino you can program it, then unplug the PC and it keeps working. One of the big benefits (apart from running on its own) is that you don't have the latency of USB, so can respond to things far more quickly.
- codereflection 13y agoYou're right, I had completely forgotten about that part. Currently Node.js can be used to control an Arduino, but it cannot run on it directly (like it can on a Raspberry Pi).
- dmbass 13y agoMaybe I'm missing something, but why does Javascript require new hardware? Can you not run whatever software this is running on another µC... say the one on an Arduino board? Obviously the drivers are different but you have to write them for this hardware anyway.
- gfwilliams 13y agoThis should work on the larger Arduino boards (the Due and 2560) and it already works on a bunch of other hardware too. To be honest the new board is just to do something a bit different - and to give backers of the KickStarter something fun that they couldn't just go out and buy.