Pico GPIO control with JavaScript
Linux Format|March 2023
Les Pounder strays from Python to show us that JavaScript, the language of the web, is a viable Pico alternative.
- Les Pounder
Pico GPIO control with JavaScript

Think Raspberry Pi Pico, think Python, right? That is generally the case. Be it MicroPython or CircuitPython, most makers go for this easy-to-understand language. There are alternatives C and Arduino are incredibly useful given the Pico's low power. But did you know that JavaScript is also a viable language? In this tutorial, we introduce Kaluma (https:// kalumajs.org), a JavaScript framework for the Pi Pico. Via three quick projects, we'll demonstrate what can be done with this rather lovely language.

The install process for Kaluma is simple, but it requires a few steps before we can write code to the Raspberry Pi Pico. Our first step is to install Node.js and npm on our system. We are using a fresh install of Ubuntu 22.04. Open a terminal and first update the APT repositories:

$ sudo apt update

Now install Node.js, followed by the node package manager (NPM):

$ sudo apt install nodejs 

$ sudo apt install npm

Using Ubuntu, install the Kaluma command line interface (CLI). This is our tool to write code to the Pico.

$ npm install @kaluma/cli

While holding the BOOTSEL button, connect your Raspberry Pi Pico to your computer. A new drive, RPI-RP2, appears. Open a web browser and visit https://kalumajs.org/download. Frtom there click on Download .UF2. Now copy the downloaded UF2 file to the RPI-RP2 drive. This writes the Kaluma JavaScript firmware to the Pico's onboard storage.

この蚘事は Linux Format の March 2023 版に掲茉されおいたす。

7 日間の Magzter GOLD 無料トラむアルを開始しお、䜕千もの厳遞されたプレミアム ストヌリヌ、9,000 以䞊の雑誌や新聞にアクセスしおください。

この蚘事は Linux Format の March 2023 版に掲茉されおいたす。

7 日間の Magzter GOLD 無料トラむアルを開始しお、䜕千もの厳遞されたプレミアム ストヌリヌ、9,000 以䞊の雑誌や新聞にアクセスしおください。

LINUX FORMATのその他の蚘事すべお衚瀺
Create your first WebSocket service
Linux Format

Create your first WebSocket service

Mihalis Tsoukalos explains how to use the Go programming language to work with the WebSocket protocol.

time-read
9 分  |
April 2023
Fantastic Mr Firefox
Linux Format

Fantastic Mr Firefox

Nick Peers takes a trip down memory lane to reveal the story behind the rise - and slight fall - of Mozilla's popular web browser.

time-read
9 分  |
April 2023
Set up your terminal and email like it's 1983
Linux Format

Set up your terminal and email like it's 1983

Jump in the hot terminal time machine with Mats Tage Axelsson who emails from the command line using the latest technology.

time-read
8 分  |
April 2023
Universal layer text effects with GIMP
Linux Format

Universal layer text effects with GIMP

Posters use them, films and presentations are hard to imagine without them: text effects. Attract attention with Karsten GÃŒnther and GIMP.

time-read
8 分  |
April 2023
Jump to a federated social network
Linux Format

Jump to a federated social network

Nick Peers reveals how you can get up and running with this free, decentralised and non-profit alternative to Twitter.

time-read
9 分  |
April 2023
Free our SOFTWARE!
Linux Format

Free our SOFTWARE!

Taking anything for granted is dangerous, so Jonni Bidwell and Mike Saunders revisit how the free software movement got started to help free us from proprietary tyranny!

time-read
4 分  |
April 2023
Master RPI.GPIO
Linux Format

Master RPI.GPIO

Les Pounder goes back to the early days of the Raspberry Pi - and his career with this classic library! -

time-read
5 分  |
April 2023
Waveshare Zero to Pi3
Linux Format

Waveshare Zero to Pi3

Transform your Pi Zero into a Pi 3, they promised Les Pounder, but it's more like adding on go-faster stripes.

time-read
2 分  |
April 2023
The Best OPEN SOURCE Software Ever!
Linux Format

The Best OPEN SOURCE Software Ever!

In an attempt to trigger controversy, Michael Reed and Neil Mohr unequivocally state these are the greatest free software apps ever. Probably. We’re just trying to be helpful.

time-read
10+ 分  |
April 2023
Linux-Mandrake 7
Linux Format

Linux-Mandrake 7

Simplicity and a wide range of applications make this a great distribution for all Linux users.

time-read
2 分  |
April 2023