Arduino Core mbed 2.0 supports Raspberry Pi Pico & Arduino Nano RP2040 Connect

Raspberry Pi Pico Arduino mBed

Last week, we noted and tried the unofficial Raspberry Pi Pico Arduino Core that works on RP2040 boards, including Raspberry Pi Pico. Everything was super early to set up and the blink sample worked just fine. But Arduino recently tweeted about the Arduino Core mbed 2.0 release that adds for Raspberry Pi RP2040 boards including Arduino Nano RP2040 Connect and Raspberry Pi Pico boards. Arduino first used mbed for their Arduino Nano 33 BLE board as they didn’t have an official Arduino core for the Nordic nRF52840 Cortex-M4 microcontroller, and it appears they’ve done the same for Raspberry Pi RP2040 whose mbed implementation itself relies on the C SDK. Let’s have a try, how hard can it be? We can find the release and changelog on Github with some instructions on the main Github. First, we can clone the repo in the sketchbook directory (See Arduino IDE’s preferences) which in my case was ~/Arduino:

We’ll also need to clone […]

Crowbits Master Kit Tutorial – Part 2: ESP32 intrusion scanner and visual programming

Crowbits Intrusion Scanner

I started Crowbits Master Kit review last month by checking out the content, user manual, and some of the possible projects for the ESP32 educational kit including a 2G phone and a portable game console. For the second part of the review, I’ll go through one of the lessons in detail, namely the intrusion scanner to show the whole process and how well (or not) it works. Let’s go to Lesson 5 directly, although I’d recommend going through the first lessons that provide details about the hardware and visual programming basics using Letscode program, which is basically a custom version of Scratch for Crowbits The user manual introduces the project, explains it is to detect intruders, and lists the learning goals as we’ll learn how to control the servo and play music on the Crowbits kit. Kit Assembly But first, we’ll have some assembly to do, in a similar way that’s we’d assemble a LEGO robotics kit. Each assembly step […]

Raspberry Pi Pico Arduino Core released for RP2040 boards

Arduino RP2040 Core

Since Arduino plans to launch its own Raspberry Pi RP2040 based board with Arduino Nano RP2040 Connect, one would have expected software support for the Arduino IDE would have come from the company itself. But apparently, the developer community, or more exactly Earle F. Philhower, III did not feel like waiting. He had previously written ESP8266Audio library for audio file and I2S sound playing routines for ESP8266 & ESP32, and has recently released Raspberry Pi Pico Arduino Core on arduino-pico Github repository. The implementation appears to be already fairly comprehensive with support for digitalWrite/Read, shiftIn/Out, SPI master, analogWrite/PWM, Wire/I2C Master and Slave, analogRead and Pico chip temperature, filesystems like LittleFS and SD/SDFS, I2S audio output, and more. The Raspberry Pi RP2040 programmable IOs are also used to control servos, generate tones, and I2S output. You’ll need the Arduino IDE 1.8.x or the beta version of Arduino IDE 2.0, and add the following Boards Manager URL in order to get started: […]

It’s now easier to customize Raspberry Pi OS images

Raspberry Pi Imager v1.6

When I need to flash a Raspberry Pi OS image, I usually download the image from the Raspberry Pi website before flashing it to a MicroSD card with either balenaEtch or USBimager. The Raspberry Pi Foundation released the Raspberry Pi Imager last year, but I never used it, except to try it out, because at the time, it would just flash the image to the MicroSD card like other tools, and since I’m working with SBCs from different vendors it did really not bring any benefits to me. But with the v1.6 release, the Raspberry Pi tool has become more useful to advanced users, notably those who like to set up the image in a headless Pi. Before we had to flash the image, mount the MicroSD card, and go edit /boot/config.txt to enable SSH and other settings. Now, it’s possible to do the same from Raspberry Pi Image v1.6 by pressing Ctrl+Shift+X to bring the Advanced options to configure: […]

Encoding and decoding AVIF pictures with open-source software & libraries

avif vs png

One of the new features of Android 12 is support for the AVIF file format that provides much smaller files at the same level of quality. Jake Archibald has done a great job comparing AVIF format to JPEG, WebP, and other still picture formats, and the results are really impressive. Besides Android 12, AVIF is already supported in Chrome browser, will be enabled by default in Firefox 86, but here’s we’ll look at some of the open-source programs and libraries that allow you to manipulate AVIF pictures. With libavif library, AOMedia has published a reference implementation in C, together with avifenc and avifdec tools, that rely on various codecs, but it appears rav1e is recommended for encoding AVIF picture, while dav1d is the best choice for AVIF decoding. libavif will not automatically build the codec, and they need to be enabled in CMakeLists.txt

as well as define the path for the selected codec. rav1e AVIF encoding library and cavif-rs […]

Maker Pi Pico STEM board mini review with CircuitPython

Maker Pi Pico First Boot

In my early list of third-party Raspberry Pi RP2040 boards, I shortly mentioned Cytron Maker Pi Pico baseboard for Raspberry Pi Pico that exposes all pins via female headers, includes LEDs for all GPIOs pin, six Grove connectors, three user push-buttons, one RGB LED, a piezo buzzer, an audio jack, a MicroSD card, and an ESP-01 socket to add WiFi connectivity. The beta version sold for $5, and at the time I missed that included Raspberry Pi Pico board as well, so basically you got a free baseboard. The Malaysian company has now sent me a review sample to play around with, so let’s have a closer at the hardware and code samples for the board. Maker Pi Pico Unboxing and Specifications I received the board in Cytron package together with a pinout diagram for Raspberry Pi Pico, and we can see the latter is already soldered to Maker Pi Pico. Maker Pi Pico specifications: Based on Raspberry Pi Pico […]

Software configuration tips for Raspberry Pi clusters & parallel-ssh command

parallel-ssh

I missed that linux.conf.au 2021 took place on January 23-25 2021, and while browsing the schedule I noticed a talk entitled “Building Raspberry Pi Supercomputers” by Federico Lucifredi, Product Management Director for Ceph Storage at Red Hat. In the talk, he mostly focuses on the software part, and besides some basic steps, I learned about some new commands that be useful to people managing clusters of Raspberry Pi or other Linux boards or hosts. Configuring a cluster He used Picocluster image in his example, but for people wanting to use 64-bit OS, he recommends Ubuntu or Fedora images until Raspberry Pi OS 64-bit becomes stable. The first part of the configuration is making sure all the main user is the same on all board, disable SSH for root, and configure run levels (X not needed on clusters). Networking is configured with fixed IP addresses for Ethernet, and DHCP for WiFi. He also configured ssh without password (i.e. public/private keys), but […]

A closer look at Raspberry Pi RP2040 Programmable IOs (PIO)

Pico PIO State Machine

The popularity of Raspberry Pico board powered by RP2040 microcontroller has made every reader wanting to know more about the board and chip. So today we will be talking about RP2040’s Programmable IOs, a feature that makes it different from most other microcontroller boards. The two PIO blocks or let’s call it the hardware interfaces in the RP2040 have four state machines each. These two PIO blocks can simultaneously execute programs to manipulate GPIOs and transfer raw data.  Now, what do these state machines do? Well, the PIO state machines execute the programs fetched from various sources. Sometimes the programs are taken from the PIO library (UART, SPI, or I2C) or user software. Why Programmable I/O? All the boards usually come with hardware support for digital communications protocols such as I2C, SPI, and UART. However, if you plan to use more of these interfaces than what is available on the board, you can use the programmable IOs provided in RP2040 […]