#RaspberryPi – Where is my Add/Remove programs? let’s use Synaptic

Buy Me A Coffee

Hi!

When I wrote about the latest version of Visual Studio Code working on the Raspberry Pi, I realize that I used a couple of commands to find an installed application.

The following command will list all the installed apps

sudo apt list --installed

Which is great, but hard to read in bash mode. So that’s why I use grep to filter for the app I want.

sudo apt list --installed | grep -i code-oss

So far, so good. The command did the trick, and I got my result: app name, version and details. However, as a long time Windows user, I was wondering if Linux users have a visual interface for this. And then I found: Synaptic.

The command to install Synaptic is maybe the last command we will use to install or uninstall an app

sudo apt install synaptic -y

And then we can launch the app using this command, and it’s need to be with sudo permissions (learned in the hard way)

sudo synaptic

At this moment, I can browse in the all list of apps. And I can quickly perform a search for my installed Visual Studio Code.

I get the result, with details, version and more.

And if you are wondering what’s the main difference with the bash command? So, I didn’t need to search and learn a command, the universal visual clue of the magnifier, or the search button were good enough for me.

Playing around with the app, I found I can display much more information for each installed app. Which is great, because I start to understand the idea and concepts of dependencies, where Linux install software, etc.

Happy coding!

Greetings

El Bruno

My posts on Raspberry Pi

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware

#RaspberryPi – Visual Studio Code blank screen is fixed on version 1.42. Thanks @headmelted! @code

Buy Me A Coffee

Hi!

When I wrote about how to install Visual Studio Code on a Raspberry Pi, there was an error on the app running on the device: the tool opened and display a black window.

We needed to manually go back to version 1.29 to avoid this problem. And we also forgot to apply any updates, each new version still have the black window error.

I was following the issue on GitHub, and I was happy when a few days ago, it was solved by headmelted (link https://github.com/headmelted/codebuilds/issues/67#issuecomment-563335451).

I’ve updated the app to the latest version (1.42.0), and it was working fine.

raspberry pi 4 visual studio code version 1.42 running fine

If we check the apt list, we can find a specific detail of the running version with the command

sudo apt list --installed | grep -i code-oss
raspberry pi 4 apt list for code -oss return 1.42

So, please go and thank headmelted by the amazing work he is doing!

Happy coding!

Greetings

El Bruno

My posts on Raspberry Pi

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware

#RaspberryPi – Ice Tower: The best cooler for your device! From 70C to <40C in a 60 minutes process running at 100% in all 4 cores

Buy Me A Coffee

Hi!

The Raspberry Pi 4 is an amazing device, and if you have been tracking the different usage scenarios for the device, you probably noticed that heat is an issue. I’ve using some Aluminum Heatsink, however still in some heavy scenarios the device temperature can be up to 70C or more.

I found out that when the device get’s to certain temperature (>80C), the device lowers its operational speed to prevent damage.

Officially, the Raspberry Pi Foundation recommends that the temperature of your Raspberry Pi device should be below 85 degrees Celsius for it to work properly. That’s the maximum limit. But it would start throttling at 82 degrees Celsius.

Raspberry Pi Temperature Monitor

While I was digging on this topic, the SeeedStudio team approached me to suggest me to test one of the best fans for Raspberri Pi 4: Blink Blink ICE Tower CPU Cooling Fan for Raspberry Pi (Support Pi 4).

This fan is massive and amazing. Look at these photos, to have a sense of the size of the fan.

raspberry pi 4 massive fan 1
raspberry pi 4 massive fan side by side with a raspberry pi

And, because I’m a programmer, I decided to test the device temperature with a long heavy process, to see how this affect the temperature.

Build OpenCV

Initially I was planning to share a machine learning training model process, but then I realized that there is something else that we can do which is very resource consuming: Compile OpenCV.

And, I know, you can install OpenCV with a simple pip install command, but let’s built it. Is much more fun. As usual, I’ll rely on one of the amazing Adrian Rosebrock Tutorials: Install OpenCV 4 on Raspberry Pi 4 and Raspbian Buster (see references)

Build OpenCV using 4 cores with a bare naked Raspberry Pi: >75C

In this 1st scenario, I built OpenCV using the 4 cores with a bare-naked Raspberry Pi. This process took almost an hour, and as you can see in the following animation:

  • The 4 cores where working at 100%
  • The temperature was around 75 degrees all the time
  • And, of course, this animation is at 300X speed.
build opencv on raspberry pi 4 no fan 300x

Build OpenCV using 4 cores with ICE Tower Cooler fan in a Raspberry Pi: <40C

In the 2nd scenario, I built OpenCV using 4 cores with the ICE Tower Cooler fan in the Raspberry Pi. As the previous one, this process also took almost an hour, and as you can see in the following animation:

  • The 4 cores where also working at 100%
  • The temperature was less than 40C degrees all the time
  • Again, this animation is at 300X speed.
build opencv on raspberry pi 4 with Ice tower fan

Differences running an App: Face Recognition

My next question was how about a normal process, like some face recognition demos. I used and changed some of Adrian Rosebrock’s face recognition demos, and here are the results.

Face Recognition app in a Raspberry Pi bare-naked, runs at 67C degrees
Face Recognition app in a Raspberry Pi with ICE Tower Cooler fan, runs at 38C degrees

Conclusion

If you are concerned about the temperature of your device, this is my top 1 option. And, if you are wondering if the fan is noisy? not at all! I have it right next to me, and I don’t even notice the fan.

About Seeed Studio

Seeed is the IoT hardware enabler providing services over 10 years that empower makers to realize their projects and products. Seeed offers a wide array of hardware platforms and sensor modules ready to be integrated with existing IoT platforms and one-stop PCB fabrication and PCB assembly service. Seeed Studio provides a wide selection of electronic parts including Arduino  Raspberry Pi and many different development board platforms  Especially the Grove Sytsem help engineers and makers to avoid jumper wires problems. Seeed Studio has developed more than 280 Grove modules covering a wide range of applications that can fulfill a variety of needs. 

Bonus: this video also analyzes the cooler in other scenarios.

Happy coding!

Greetings @ Burlington

El Bruno

References

My posts on Raspberry Pi

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware

#RaspberryPi – Microsoft Teams in RPi 4? Mmm, not yet, but it’s an interesting learning journey to start the New Year 2020

Buy Me A Coffee

Hi!

A couple of weeks ago, Microsoft released a preview version of Microsoft Teams for Linux (see references). Since that day, I was hoping to have a chance to play around with this version, mostly in a Raspberry Pi.

Those days I also had this conversation with my best half (who is a very smart person):

  • Why do you need to do this? You already have a very powerful MacBook, an amazing Dell laptop and a gaming PC. So, why do you need to install Microsoft Teams in a not so powerful device at home?
  • Because …

There is no logic answer for this, however I learned a lot in the process. Let me share, because it all start with the official download page for Microsoft Teams.

Microsoft Teams Versions

raspberry pi 4 download microsoft teams

Besides the official download page for Microsoft Teams, there is an interesting page which describes all the possible client scenarios for Desktop, Web, and Mobile. And for Desktop it includes, Windows, Linux and Mac: Get clients for Microsoft Teams (see references).

In the Linux section, we have the option to review the packages DEB and RPM repositories

This is also interesting, because browsing the repositories, you may find the Release and the Insiders versions.

Microsoft package repository with release and insider version of MS Teams

Raspberry Pi 4 64-bits kernel

The Raspberry Pi 4 has a 64 bits kernel, however the current Raspbian distro are not using the 64-bit kernel capabilities of the device. There is an entry on the RaspberryPi forums which explains how to enable the 64-bit kernel: Pi4 64-bit Raspbian kernel for testing – Focus on Pi4 (see references)

Add to config.txt

arm_64bit=1

and Run

sudo rpi-update

And done, in a NON OFFICIAL or NON SUPPORTED way, my device is running on X64.

This process took some time, at least 10 minutes.

Note: I’m 99% sure that this is not supported. So, all of this is mostly a testing and learning experience.

Add AMD64 architecture to Raspberry Pi.

Back to Microsoft Teams. After checking the available versions, I realized that AMD64 is the only supported architecture in Linux. The Raspberry Pi uses an ARM CPU, which uses the ARM instruction set. That is a different instruction set than that used by i386 and x86-64/amd64. So, there is no way to install an AMD64 package on a Raspberry Pi 4

However, I found an interesting command: dpkg –add-architecture

And I started to read about the command (some links in references).

dpkg –add-architecture is meant for CPUs that support multiple instruction sets. I think it was mainly introduced for x86-64 (i.e. 64bit) CPUs, which also support i386 (i.e. 32bit) instructions. This allows you to install packages compiled for i386 on a system that otherwise uses x86-64 packages.

So, even if it won’t work, I tried to add AMD64 in my RPi 4 with the following command:

#sudo dpkg --add-architecture {architecture name} && sudo apt-get update
sudo dpkg --add-architecture amd64 && sudo apt-get update
raspberry pi 4 lscpu

So, after this, I have the AMD64 architecture instructions installed. They are not going to work, but I can install an AMD64 package now.

Installing Teams

If you are running your Raspberry Pi with a desktop interface, just double clicking on the file: teams_1.2.00.32451_amd64.deb. This will start the installation. And, of course, it will fail!

raspberry pi 4 install microsoft teams.png

So, it was time to read and learn, and I found an alternative and amazing tool to install DEB files: GDebi (see references)

Gdebi is a tiny little app that helps you install deb files more effectively by handling dependencies. Learn how to use Gdebi and make it the default application for installing deb packages.

It’s very easy to install, just 2 commands

sudo apt-get install gdebi-core
sudo apt-get install gdebi

Note: It should work with the 2nd command, however, I needed to add the core option 1st.

raspberry pi 4 open gdebi.png

Now I got GDebi, and I can open the package with the tool, and I got a dependency problem with the libasound2 library.

raspberry pi 4 gdebi error on dependencies libasound2

Even so, I can start the installation with the command

sudo gdebi teams_1.2.00.32451_amd64.deb

and, the app won’t work, but I’ll see the shortcut access in the [Sound & Video] folder

Again, the app won’t launch, but in the personal side, I spend some good time here learning a lot about Linux, processor architectures and more. So, I’m 100% cool now!

Happy coding and Happy New Year!

Greetings @ Burlington

El Bruno

References

My Posts

My posts on Raspberry Pi

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware

#RaspberryPi – Microsoft Teams available on #linux, and this is the right way to install it

Buy Me A Coffee

Hi!

I’ve using Microsoft Teams in Windows 10 and MacOS and the experience is amazing. When I was trying to work only in my Raspberry Pi 4, having a native app was something I missed a lot. I mean, Microsoft Team web version is fine, however the desktop experience is much better.

And now, Microsoft announced that there is a Linux version of Microsoft Team, so I’m trying to manage my schedule during the next couple of days to test this in Raspbian in my Raspberry Pi 4.

We can download the native Linux packages in .deb and .rpm formats from https://teams.microsoft.com/downloads#allDevicesSection. Very cool to see all the available options

And I’m looking forward to check authentication, integrated services and more!

Happy coding!

Greetings @ Toronto

El Bruno  

References

My posts on El Bruno

#AI – Getting started with #ComputerVision, #DeepLearning, and #OpenCV by Adrian Rosebrock @pyimagesearch

display face landmarks in python using face recognition
display face landmarks in python using face recognition
Buy Me A Coffee

Hi!

When you start to research the amazing world of Computer Vision, you find that there are plenty of courses, tutorials, videos and more resources. Something is kind of “too much”, and it’s not easy to choose where to start.

That’s why, when you arrive to one of the Adrian Rosebrock tutorials or articles, they’ll end in one of your favorites bookmarks. He has amazing detailed step by step tutorials, and I learned a lot of Raspberry Pi and OpenCV from his website.

A couple of weeks ago, Adrian released an amazing resource for Computer Vision enthusiasts:

Need help getting started with Computer Vision, Deep Learning, and OpenCV?

No matter if you are starting from zero, have some knowledge or you are already an expert; you must look at this amazing compile of resources. I’ll copy and paste the main topics

And I can’t thanks enough Adrian for his amazing work and also, for sharing all of this!

Happy coding!

Greetings @ Toronto

El Bruno

#Event – Materials and Resources used during my #CustomVision and #AI session at #CDC2019

Hi!

Drafting these in the airplane, and also drafting a bigger post about the full and amazing experience at the Caribbean Developer Conference. So, I’ll start with the usual slides and materials, and also use this post later as reference for the full experience

Slides

Code

https://github.com/elbruno/events/tree/master/2019%2010%2004%20CDC

Links

Tweets

Greetings @ Toronto

El Bruno

References

My posts on Raspberry Pi

#RaspberryPi – Double Commander on #RaspberryPi4, because files are important!

Buy Me A Coffee

Hi !

As a Windows User, I was never happy with the out-of-the-box File Explorer, that’s why I’m a big fan of Total Commander. The 2 panels mode to move or copy files between the panels, or the quick access keys, ftp connections and more, makes Total Commander a #MustHave tool in my Windows 10 Station.

I started to look for something similar for Raspberry Pi, and after a couple of tests my choose is: Double Commander (see references).

It’s easy to install, just this command

sudo apt-get install doublecmd-qt

And it will appear on the Accessories menu.

So far, Double Commander, is part of my setup list of tools to be installed on Raspbian for my Raspberry Pi 4 developer station!

Happy Coding!

Greetings @ Burlington

El Bruno

References

My posts on Raspberry Pi

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware

#VSCode – Installing Visual Studio Code @code in a #RaspberryPi, run as root, fix black screen (Updated)

Buy Me A Coffee

Hi!

TL;DR: These 2 commands are the only ones you need to install

wget https://packagecloud.io/headmelted/codebuilds/gpgkey -O - | sudo apt-key add –
curl -L https://code.headmelted.com/installers/apt.sh | sudo bash

At the bottom of the post you will also find the command to run Visual Studio Code as Root in RPI

Some history on installing VSCode in a Raspberry Pi

Now that I have my amazing Raspberry Pi 4 with 4GB RAM, it’s time to see how serious the device is. So, I decided to install and use some developers’ tools in the RPi. My dev list will be something like this

  • Python
  • Some ML and AI Python packages
  • GIT
  • Arduino
  • Visual Studio Code

It’s been a while since I installed VSCode in the device. The last time I did this, I needed to download the code from GitHub and compile the tool in the Raspberry Pi. As far as I remember this was a +25 min process.

Lucky for us the process can now be much simpler, thanks to Headmelted (see references). Now, we only need a single command to install VSCode:

. <( wget -O - https://code.headmelted.com/installers/apt.sh )

Install process started! Or Maybe not because I found this amazing GPG error

python error installing visual studio code in raspberry pi
pi@rpidev3:~ $ curl -L https://code.headmelted.com/installers/apt.sh | sudo bash
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
 100  2349    0  2349    0     0  19739      0 --:--:-- --:--:-- --:--:-- 19906
 Detecting architecture…
 Ensuring curl is installed
 Reading package lists… Done
 Building dependency tree       
 Reading state information… Done
 curl is already the newest version (7.64.0-4).
 The following packages were automatically installed and are no longer required:
   python3-pyperclip python3-thonny rpi.gpio-common
 Use 'apt autoremove' to remove them.
 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
 Architecture detected as armv7l…
 Retrieving GPG key headmelted…
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 gpg: no valid OpenPGP data found.
 Removing any previous entry to headmelted repository
 Installing [headmelted] repository…
 Updating APT cache…
 Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
 Hit:2 http://archive.raspberrypi.org/debian buster InRelease
 Get:3 https://packagecloud.io/headmelted/codebuilds/debian stretch InRelease [23.4 kB]
 Err:3 https://packagecloud.io/headmelted/codebuilds/debian stretch InRelease
   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0CC3FD642696BFC8
 Reading package lists…
 W: GPG error: https://packagecloud.io/headmelted/codebuilds/debian stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0CC3FD642696BFC8
 E: The repository 'https://packagecloud.io/headmelted/codebuilds/debian stretch InRelease' is not signed.
 Done!
 Repository install complete.
 Installing Visual Studio Code from [stretch]…
 Reading package lists… Done
 E: The value 'stretch' is invalid for APT::Default-Release as such a release is not available in the sources
 Visual Studio Code install failed.

There a public GPG key used to verify the package and the SH script somehow does not download it (I think the ARM RPI version is still not defined). So, before the previous command, I need to run this command

wget https://packagecloud.io/headmelted/codebuilds/gpgkey -O - | sudo apt-key add –

Then run this command

curl -L https://code.headmelted.com/installers/apt.sh | sudo bash

Now we have Visual Studio Code installed!

raspberry pi visual studio code installed

Old Issue, not needed since 2020 January

But, yes another but, you may note that the tool open and display a black window. Again, I need to go deeper on the details, but the latest version does not work well. There is some context information on GitHub (see references), and the proposed solution is to rollback to a previous version

sudo apt-get install code-oss=1.29.0-1539702286

And we also need to disable the automatic updates on this tool

sudo apt-mark hold code-oss

The following command will remove the hold for Visual Studio Code

sudo apt-mark unhold code-oss

And now, yes, we got a fully functional Visual Studio Code in our Raspberry Pi!

How to run VSCode as root

Another update, is a command to run VSCode as root

# open VSCode in default source code folder with root
sudo code-oss --user-data-dir=/home/pi/src/vsCodeUsrData

Of course this is not the best way to use Visual Studio Code, however something it helps 😀

Note: Due some Deep Neural Network and docker process, my device is starting to heat a lot, so I’ll try a next generation cooler like this one: Blink Blink ICE Tower CPU Cooling Fan for Raspberry Pi (Support Pi 4)

Happy Coding!

Greetings @ Toronto

El Bruno

References

My posts on El Bruno

My posts on Raspberry Pi

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware

#RaspberryPi – 6 commands to install #OpenCV for #Python in #RaspberryPi4

Hi !

Quick post to remind me the 6 commands to install OpenCV in my Raspberry Pi

sudo apt-get install libhdf5-dev libhdf5-serial-dev libhdf5-100
sudo apt-get install libqtgui4 libqtwebkit4 libqt4-test
sudo apt-get install libatlas-base-dev
sudo apt-get install libjasper-dev
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py
sudo pip3 install opencv-contrib-python 

There is an optional command to update pip, which is always nice.

Happy Coding!

Greetings @ Burlington

El Bruno

References

My posts on El Bruno