A Strava dashboard on a Raspberry Pi (Part 2): Installing software

In last blogpost we set up the Raspberry Pi, attached the Inky Impression display and got the Raspberry Pi ready for remote access.

Time to get the Inky Impression software installed and make the Inky Impression screen display something.

Your SSH connection of choice

For this we’re going to have to run some commands via remote SSH. There are multiple ways to log in remotely. You can use a tool like Putty or the terminal on MacOS (I like iTerm2). That’s actually simpler.

But I chose to use Visual Studio Code because you can edit Python code remotely via SSH straight on the Raspberry Pi.

To do this you must install Visual Studio Code. Visual Studio Code has all kinds of extensions. Here we will install the Remote – SSH extension. And while you’re at it, maybe install the Python extension as well, because we will be writing some Python later.

Installing the Remote-SSH extension in Visual Studio Code

After that is done, open the Command Palette with Ctrl-Shift-P (or Command-Shift-P on a Mac). And look up Remote SSH. Choose the option Remote-SSH: Connect to Host. Remember that username you created in Part 2? You need that username now. Type the following (filling in your username in place of <name of your user> and the hostname of your Raspberry Pi for <hostname>):

<name of your user>@<hostname>.local

In my case that is:

inkyone@inkypi.local

Then it asks you what file it needs to edit. I chose the first one and that worked fine.

Now open the Command Palette again and choose Remote-SSH: Connect to Host again. Your new connection should be in the list.

When you click it, it will require the password for this user. Enter it and you will be connected. But you’re not going to see a whole lot. Now it’s time to go to the Terminal window and open a new terminal. In the lower part of the window something like this should appear:

That is your command prompt. And we can type in some Linux commands in here.

Installing the Inky Impression software

Pimoroni, the company that sells the Inky Impression display has a Python library and a bunch of example Python commands that will allow you to display things on your Inky Impression screen.

You install this Python library with this command (I ran it from the home directory of my Raspberry Pi user. So it ended up in /home/inkyone .):

curl https://get.pimoroni.com/inky | bash

After that ran – hopefully – successfully, we should already be able to show something on our e-ink screen.

Have something to show for – with example code

Let’s go to one of the directories with example code. In the terminal type:

cd $HOME/Pimoroni/inky/examples

Let’s try the name-badge.py program. Since the programming language Python is already installed on Raspberry Pi’s we can just run it like this (replace my name with yours of course):

python name-badge.py --name "Marcel-Jan"

This is a good test to see if all previous steps went well. For example, when it runs the program should say that it detected our Inky Impression display:

Inky pHAT/wHAT: Hello... my name is:

Use Inky pHAT/wHAT as a personalised name badge!


Detected 7-Colour (UC8159)

If your display isn’t detected that could be because you didn’t enable SPI and I2C (see Part 2 under “Configure Remote SSH, SPI and I2C”).

If all went well, your display should look something like this:

The Inky Impression display showing my name badge.

Good for a first try, but it’s more fun to show a 7 colour image. Let’s go to the 7color subdirectory and run:

cd $HOME/Pimoroni/inky/examples/7color
python image.py images/girldoomscrolling.jfif

It now should show you an image of a Victorian woman doom scrolling. You might wonder how you can upload and show your own images. You can put these on your Raspberry Pi via FTP. For this you can add a FTP extension to your Visual Studio Code setup or use software like WinSCP or FileZilla.

And with that we’re good to go for a completely different adventure: retrieving your Strava data.

This entry was posted in Howto, Python and tagged , , , , . Bookmark the permalink.

2 Responses to A Strava dashboard on a Raspberry Pi (Part 2): Installing software

  1. Pingback: Building a Strava dashboard on a Raspberry Pi with an e-ink display | Expedition Data

  2. Pingback: A Strava dashboard on a Raspberry Pi (Part 1): Setting up the Raspberry Pi | Expedition Data

Leave a Reply

Your email address will not be published. Required fields are marked *