Home Technology Linux Raspberry Pi corner – Linux Magazine

Raspberry Pi corner – Linux Magazine

Raspberry Pi corner – Linux Magazine

This time we look at two new products from the Raspberry Foundation, four projects and a new version of the handy Raspberry Pi Imager app, also from the Raspberry Foundation.

For sale: the RP2040

After the release of the Raspberry Pi Pico microcontroller in January, the Foundation has now decided to offer the self-developed chip, the RP2040, as a separate component for $1 each. A total of 40,000 units will be available at launch and will be pulled from the Pico’s production line. This enables developers and makers to create their own product based on a Raspberry chip. The chip has two CPU ARM Cortex-M0+ cores at 133Mhz. The chip has 264KB of RAM. The programmable I/O system is what many buyers will soon appreciate. For example, you can run FreeRTOS or MicroPython on the chip, these are real-time environments.


The Raspberry Foundation comes with the next generation of PoE HATs. This PoE+ HAT offers more power (25.5 Watts instead of 15.5 Watts), supplies up to 5A of current and supports the 802.3at PoE+ standard. Moreover, this HAT gets less hot than its predecessor. The new HAT comes at the right time, because parts of the previous version are currently difficult to obtain due to the use of a component that is affected by the global chip shortage. The HAT is one of the most purchased accessories for the Raspberry Pi, according to the Raspberry Foundation. The price of the new HAT has remained the same, continuing the trend that new versions of existing products do not become more expensive.

calculate PI

Pi, as in the infinite irrational number π, calculated as 3.141592653 and so on, is calculated by Adrian Chung in the free downloadable MagPi Magazine 106 (https://magpi.raspberrypi.org/issues/106). Because Pi is of course calculated on the Pi. The algorithm used is spigot (https://en.wikipedia.org/wiki/Spigot_algorithm), which simply calculates the next digit of pi. To visualize it, a tap has been made from which the calculated numbers of pi behind the decimal point seem to flow. They are displayed as a chaser on an LED matrix. The LED matrix consists of a few MAX7219 8×8 LED display modules mounted on a 5 Volt rail. Three GPIO pins drive the LED. After about six hours of calculation, the Raspberry Pi has calculated the first 8,000 digits. It can be even faster, but then they are no longer easy to recognize on the LED display. Adrian used a 1GB Pi 2 and it would probably end up bogging down somewhere on available memory.

Info: https://www.raspberrypi.org/blog/calculate-pi-with-a-raspberry-pi-spigot-the-magpi-106/


What do you do if your grandpa or grandma doesn’t have a smartphone or PC and has nothing to do with technology? You then send an old-fashioned telegram. Yayagram is a compound of the Castilian Spanish word Yaya for grandma and telegram. With Yayagram you can send a text message simply by pressing a button. Grandpa or grandma chooses the recipient of the message by plugging a large jack plug into the correct connector, a separate connector for each recipient, and then pressing the button to start the recording and send it automatically. Your reply to grandpa or grandma’s voice message is printed on a built-in thermal printer like an old-fashioned telegram. The basis of Yayagram is a Raspberry Pi 4 and Python libraries, and of course Jack plugs, LEDs cables, the printer, a microphone and buttons. Info: https://www.theverge.com/2021/4/26/22403344/diy-device-yayagram-telegram-voice-messages-physical-phone-switchboard

Raspberry Pi Imager

A new version of the Raspberry Pi Imager is available. The imager is very easy to use for beginners to flash Linux and other images to the SD card where the Pi will boot, but also offers some more advanced options under water in a separate menu, which can be called with CTRL + SHIFT + X . In the advanced menu you put settings that you normally perform each time in an image, such as the host name. There is a setting to disable telemetry so you are not “tracked” when using the app. Nice to be able to arrange privacy, although not much more than a ping is sent to the Raspberry Foundation website. On the website you will find a 45 second video, which explains how you can easily install an image on an SD card with Raspberry PI Imager. Raspberry Pi Imager is downloadable for Windows, macOS, Ubuntu x86 and Raspberry Pi OS. On the Raspberry install imager with: sudo apt install rpi-imager.

Info: https://www.raspberrypi.org/software/

The support for a desktop OS makes sense, because if you have a blank/bare Pi, you’ll need to write an image to the SD card from your Linux, Mac, and (even) Windows desktop.

Temperature measurement

How cold is it in your freezer or refrigerator? Actual temperature measurement is possible by connecting a temperature sensor to the Pi. Add a dashboard that shows the temperature and make it possible to send alerts, for example if the temperature in the freezer becomes too high. What do you need? A cheap Pi Zero W, a temperature sensor like the Adafruit BME280 that can also measure humidity, cables and a housing. This project is nicely detailed including the connection of the sensor as well as Python libraries. The dashboard runs in the cloud at Initial State, but a free trial is available. The alerts are also sent from that cloud dashboard. See https://www.raspberrypi.org/blog/remotely-monitor-freezer-temperatures-with-raspberry-pi/, also for a YouTube movie.

Machine learning

Embedded machine learning and the Pi are made for each other, especially because the hardware is so cheap. Edge Impulse makes machine learning more accessible as it now supports the Pi as well. There are Pi SDKs for Python, Node.js, Go, and C++. On the website you can see how machine learning can find the difference between a banana and an apple. You need an account with Edge Impulse and then start a new project. You install edge-impulse-linux and add your camera and microphone. You take a series of photos of bananas and apples and upload them to the cloud. There the data is analyzed (the model is trained on the basis of your photos), this takes a while, and you then download the result back to the Pi as a model. The Pi is then able to analyze the video stream live (offline, so without a cloud connection) and recognize bananas and apples. Incidentally, Edge Impulse does not yet support Linux.

Info: https://www.raspberrypi.org/blog/edge-impulse-and-tinyml-on-raspberry-pi/


Please enter your comment!
Please enter your name here