When programming a microcontroller to do your bidding, you only have two choices. You could write your code in a proper language such as C and cross-compile your source into a piece of firmware easily understood by a micro. Alternatively, your could load an interpreter on your microcontroller and write code via a serial connection. Interpreters are a really fast and easy method to dig in to the hardware but unfortunately most microcontroller interpreters available are based on BASIC or Forth.
[Gordon] figured it’s not 1980 anymore, and interpreters for these relatively low-level languages aren’t a good fit with the microcontrollers of today. To solve this problem, he created Espruino, a JavaScript interpreter for the new batch of ARM development boards that have been cropping up.
Espruino is designed for the STM32VL Discovery board, although [Gordon] plans on porting his interpreter to the Arduino Due when he can get his hands on one. Installation is as easy as uploading any other piece of firmware, and even though [Gordon]’s STM32VL doesn’t have a USB port for a serial terminal, it’s a snap to connect a USB to TTL converter and get this interpreter working.
Espruino isn’t open source yet, only because [Gordon] would like to clean up his code and write a bit of documentation. He’d also like to make Espruino profitable so he can work on it full-time, so if anyone has an idea on how [Gordon] can do that, leave a note in the comments.
If the raspberry pi is considered an ARM development board (armv6 architecture, after all) there is nodejs.
True, and there’s the BeagleBone too. They’re not very lightweight though – run them off a few AAs and see how long they last…
Also generally you don’t want your torch/etc to take 30 seconds to boot!
Beaglebone takes about 5s to boot if you configure it correctly.
The RPi with Archlinux takes ~10 seconds, maybe too long for some. Torch/etc? You mean torch, like a flashlight? Who needs to run javascript on their flashlight? LOL actually I use my HTC Incredible 2 for a flashlight. It has a flashlight app and not only runs javascript but lots of other stuff. Seems I recall it being built with an ARM processor of some stripe.
Yes, flashlight – Maybe you want to hack one to flash out morse code. For someone with minimal programming knowledge but a desire to do things like that, Espruino is perfect.
I’m just thinking of small projects that I’ve seen people put together with Arduino. Things like Plant Waterers, Cocktail Makers, Time lapse photography, etc.
Those types of things don’t require lots of CPU power, but being able to code them quickly and get instant feedback is a real bonus.
If I could make it profitable–why would I tell anyone, and not just do it myself?
Damn. I didn’t think of that.
Well if you do think of something feel free. I’m sure writing a JavaScript interpreter will only take you a few hours.
Yeah, you’re right; I think JavaScript is a bastardized language anyhow.
Actually, to clear things up; I think it’s a good project, and you have all rights to profit from it–just not from my ideas, as HAD seems to sum it up (I didn’t see any such requests on your site, so I apologize for that).
Perhaps because you’re not interested in just doing it yourself but you support the maker/small entrepreneur world and want to see this guy succeed because it’s not only a good thing to do but it benefits others by availability of a neat, new dev environment.
What about Flattr? (Social Micropayments)
Flattr looks interesting – I wonder what the takeup of it is though – I doubt many people would create a Flattr account just to donate?