RP2040 picture on left by Phiarc, CC BY-SA 4.0, via Wikimedia

Kaluma Puts JavaScript On The RP2040

With a simple firmware update, Kaluma puts a lightweight JavaScript runtime on the Raspberry Pi Pico (which uses the RP2040 microcontroller), providing handy modules for file systems, graphics, networking, and more. Code for a simple LED blink can then look like:

// index.js
const led = 25;
pinMode(led, OUTPUT);
setInterval(() => {
digitalToggle(led);
}, 1000);

Development can then be done using tools that are very familiar to JavaScript developers, such as npm and flashing new code to a USB-connected Pico with the (Node.js-based) Kaluma command-line interface. Take a look at the GitHub repository for the project, or browse some of the projects made with Kaluma.

Much like with MicroPython, there’s value to be had in putting implementations of high-level languages on microcontrollers. Each new language opens embedded programming to a whole new group of coders. But it’s not just languages making their way to the RP2040. Wonderful projects such as emulating the ZX Spectrum on an RP2040 also happen.

Thanks to [Shri Hari Ram] for the tip!

Javascript Drum Machine

js-909

[Cameron Adams] recently appeared on a panel about JavaScript libraries. He represented the hard working coder that still wrote everything from scratch. He wanted to make something mindblowing for the audience. He ended up creating the JS-909 drum machine entirely in javascript without relying on libraries or flash. While he makes no claims of compatibility, it certainly is a nice bit of kit.

[via Waxy]

Javascript Vi


Few would dispute that Vi was a great text editor in its day, but no one has done anything to bring it back until now. A company called Internet Connection has developed JSVI, a clone of Vi that was written in javascript and runs inside editable text areas on virtually any browser with javascript support.

It functions identically to Vi, offering ed/ex command support, vi-keys, unicode awareness, and a number of other features available on Vi. You can see a demo of JSVI here. If you prefer to run vi on your own page, download this javascript document. JSVI is open source, and we certainly agree with [Jason Striegel] that this would make a fitting addition to any Unix blog or forum.

emacs sucks.

[via Hackzine]

Making Art With Javascript

Mozilla coder [Aza] is connected to the past and the present: he wanted to celebrate the release of Firefox 3, but pines for the days when one could use small amounts of code to make compelling art. As a way of addressing both things, he has released ContextFree.js, a javascript port of [Chris Coyne]’s Context Free Art. Users can visit Algorithm Ink, where they can draw various compelling designs with just a few lines of script. ContextFree.js compiles the scripts and turns them into visually arresting geometric designs. Users can also browse through designs made by others, easily save them as JPGs, or even modify them by adding their own bits of code. What’s more, it’s not out of the question to use this to generate random images on a website, creating a unique visual experience for every single visitor. You all know what we want to see, though: JavaScript gurus working some real magic with this. Better yet, said gurus can play around with the core open-source code and make something truly their own on the most fundamental level. Definitely check out the video above to get an idea of how easy this is.

[via Waxy]