raspberry pi 4b 2gb – more working observations

Arduino IDE configured to communicate with Circuit Playground Express

Working with the Raspberry Pi 4B continues. I installed the Arduino IDE version 1.8.9 (https://www.arduino.cc/en/Main/Software) and was able to quickly start it and have it working with a Circuit Playground Express. I found a sample C++ program on GitHub (https://github.com/adafruit/Adafruit_CircuitPlayground/tree/master/examples/FidgetSpinner) and created a simple project, compiling it, but not uploading it. That will come later. I just wanted to check out the basic installation to see if it worked up to a point, and it all does. My only comment is that when you download the IDE that you choose the ARM 32-bit version. It’s a standard tar file, no compression. Once untarred, then execute install.sh. It will not only place everything where it needs to be, but set up permissions, groups, and add a menu entry under Programming.

The IDE seems fully functional. One aspect of using the IDE natively on the RPi 4B with 2GB is that compiles are noticeably slower than they are on my MacBook Pro. But that’s to be expected, and the time taken is not excessive. Just noticeable.

During this period of testing I’ve also managed to force Raspbian to hit the swap space. Unlike the 1GB RPi 4B, the 2GB version’s use of swap is one to two orders less than the 1GB version with the same application load. Right now I’m seeing 4.5MB out of 2GB of swap being used, or essentially next to nothing.

Finally, I installed two more software packages, Swift for ARM and PowerShell Version 7 Preview 2 for ARM.

In order to install Swift on Raspbian Buster, you neeed to add a reference to the repo, then install Swift from that repo. Those steps are:

curl -s https://packagecloud.io/install/repositories/swift-arm/release/script.deb.sh | sudo bash
sudo apt install swift5=5.0.2-v0.4

Once installed you can run this basic test:

pi@raspberrypi:~ $ swiftc --version
Swift version 5.0.2 (swift-5.0.2-RELEASE)
Target: armv6-unknown-linux-gnueabihf
pi@raspberrypi:~ $

You can read about Swift ARM here: https://swift-arm.com/
Note that you should check to see what the current version of Swift ARM is when you install. I chose 5.0.2-v0.4 because that was what was published in the announcement on the web site.

PowerShell Core for Raspbian Buster is available as a regular tar file here: https://github.com/PowerShell/PowerShell/releases

Once downloaded, create a directory on your login home. In my case I simply created ~/powershell. Step into it and untar the newly downloaded archive into the newly created directory. Once untarred simply run pwsh. For example:

pi@raspberrypi:~/powershell $ ./pwsh 
PowerShell 7.0.0-preview.2
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/powershell
Type 'help' to get help.

PS /home/pi/powershell> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.2
PSEdition                      Core
GitCommitId                    7.0.0-preview.2
OS                             Linux 4.19.58-v7l+ #1245 SMP Fri Jul 12 17:31:45 BST 2019
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PS /home/pi/powershell> 

And that’s about it.

One more thing. The Flirc case runs warm, but not excessively so. CPU temperatures seem to run between 45°C and 50°C. I’m still working on a 40-pin ribbon cable connector that will easily fit inside the case over the GPIO header.

new raspberry pi computers and other news


When the Raspberry Pi foundation announced the release of the new Raspberry Pi 3 Model B+, I ordered two from element 14 (element14.com). They were the only vendors at the time who had them in stock for the standard price of $35. When I received them I discovered that when they say the 3B+ needs 5V/2.5A, they really mean 2.5A, not 2.4A like I’d been using before. So I went back online and order a pair of new power supplies, along with two Samsung PRO Plus microSDHC 32GB cards. I also discovered via the dreaded red flashing power LED (four flashes) that the older Samsung EVO+ 32GB microSDHC cards would not boot the 3B+ fully. I don’t know why as they work just fine on every other earlier Raspberry Pi I own, up to and including the prior 3 Model B. Interestingly I didn’t have boot issues with any of the SanDisks I was using, just that particular card brand and model.

I also ran into an issue updating all my Arch Linux ARM Raspberry Pi systems. They all failed to update (pacman -Suy), and they all failed when attempting to get the catalog from the community repository. A bit of checking on the official Arch wikis turned up nothing. This isn’t the first time I’ve faced this update failure and been forced to reinstall Arch as a consequence. This time, rather than reinstall Arch, I decided to switch completely to the “official” Raspberry Pi distribution, Raspbian.

Raspbian has undergone considerable polish over the last 12 months, to the point where I can easily live within the Raspbian graphical desktop. The desktop has a very nice file browser, terminal, and the Chromium browser is now up-to-date with equivalents across all operating systems. I installed Raspbian by pulling down the image file and using Etcher, all of this on my Ubuntu 16.04 notebook. It’s extremely easy to load-and-go with both Raspbian and Etcher. Before I wiped and reloaded, I made full backups of the older /home/alarm home directories to pick up all my earlier work, then copied them back to the pi account home directory via a separate folder.

With Raspbian everything seems to be working just fine. I was even able to start this post on the older Raspberry Pi 3 Model B using Chromium, although I finished the post on my Mac. I had to transfer a photo I took using my iPhone via Google Drive, and I could have done it on the Pi, but I’m a Mac addict, and I wanted to run something undisturbed on the Pi.

One test I ran was using the tools I wrote in Python for the Sense HAT. I won’t go into the details of how I got the Arch Linux ARM set up to work, but I will say that Raspbian was already set up out-of-the-box to run my Python code unmodified with the Sense HAT plugged into the board, and without installing and/or configuring any other Raspbian packages. I look forward to moving my C++ based Pi code over.

One other observation: The 3B+ runs warm, much warmer than any other Raspberry Pi. I’ve done nothing to tweak the operating frequency of the board. My advice is to buy the heat sink kit for the Raspberry Pi and attach it to the board.