Onion Omega2 Dash

An open-source touchscreen & Wi-Fi-connected Linux dev board

Limited items in stock

View Purchasing Options
Dec 24, 2019

Project update 3 of 18

Display Images with your Omega2 Dash

Hey everyone,

Hope you’re enjoying the holidays! We thought you might enjoy a quick guide on using the Omega2 Dash to display images.

The Omega2 Dash uses a small application called fbi to draw jpg and png images to the TFT display. It comes preloaded as part of the operating system on the Omega2 Dash and it’s actually quite capable.

Let’s dive in!

First, disable the blinking cursor

Before we start, let’s disable the blinking cursor on the display so it doesn’t get in the way of our images. Run this on the command line:

echo 0 > /sys/class/graphics/fbcon/cursor_blink

More info on controlling the display can be found on the Omega2-Dash repo on GitHub.

Displaying images from the Omega’s filesystem

First and foremost, let’s display an image that we have on the Omega’s filesystem.

If you’re curious about how to transfer images to your Omega, see our documentation article on the subject.

The command is straight-forward:

fbi -d /dev/fb0 -notty -nocomments --noverbose <PATH TO FILE>

We have an onion-logo.png file in the /root directory, so we can do this:

cd /root
fbi -d /dev/fb0 -notty -nocomments --noverbose onion-logo.png 

When the image is displayed, you can choose to leave it there, or hit Enter to clear the screen:

Downloading and displaying images

It’s also pretty handy to download an image from the internet and display it. We’ve put together a small script to do just that, it can be found here in the Omega2-Dash repo on GitHub.

The script will download the image file to the Omega, name it with a timestamp, and display it to the screen. Here’s how to run it:

sh image-dl-display.sh <URL TO IMAGE>

A festive example:

sh image-dl-display.sh https://deepundergroundpoetry.com/images/uploads/poemimages/330742.jpg?1545072728


One more thing, you can also display images one after the other, like a slide show. Just add the images to the fbi command:

fbi -d /dev/fb0 -notty -nocomments --noverbose <FIRST IMAGE> <SECOND IMAGE> <THIRD IMAGE> <ETC>

Hit Enter or Space to move on to the next image

We had a nice little collection for our slideshow:

fbi -d /dev/fb0 -notty -nocomments --noverbose onion-logo.png omega2-pinout.png map.png img_2019-12-23_16-24-09.jpg img_2019-12-23_16-08-38.jpg img_2019-12-23_16-22-47.jpg

Sign up to receive future updates for Onion Omega2 Dash.

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects