Pico GPIO control with JavaScript
Les Pounder strays from Python to show us that JavaScript, the language of the web, is a viable Pico alternative.
OUR EXPERT
Les Pounder is associate editor at Tom’s Hardware and a freelance maker for hire. He blogs about his adventures and projects at http://bigl.es.
YOU NEED
Pi Pico
PIR
obstacle sensor
Breadboard 5x M to M jumper wires Buzzer
Code: https:// github.com/ lesp/LXF- 299-Java Script-on-Raspberry-Pi-Pico/ archive/ refs/heads/ main.zip
The LED blink project is a great way to test that the code and the hardware can talk to one another.
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