If you have ever tried to display something on an e-paper screen from your Raspberry Pi, you understand what a painful process it can be. If you succeeded, you're probably a rockstar programmer. I am not a rockstar programmer, but I got it to work with a mishmash of bits and pieces of code and a lot of research about how the e-paper display works.
Here's how to do it so I can save you possibly weeks of work. Why? Because I'm a nice guy.
This software will allow you to easily take appropriately sized images on your machine (or from anywhere, really) and display them correctly on the e-paper display. This is no simple task since the demo software that you get with the e-paper display only has two demo images that are built in code, which doesn't work in real-world scenarios.
You'll need a bit of hardware to get started.
- A Raspberry Pi. You can purchase these literally everywhere. Doesn't matter what model, but we use the Model B.
- An Embedded Artists e-paper display. Specifically, this code is made to work with the 2.7" model.
You'll need a few things to get started:
- The Linux build tools
- libi2c developer tools (if you're not running Rasbian)
- Git (this may already be installed)
Here's a simple one-liner for you to run:
sudo apt-get update && sudo apt-get install -y gcc make build-essential imagemagick git-core libi2c-dev
This will likely take a while. Go grab a cup of
Next, install wiringPi. Here's a quick cheet sheet:
git clone git://git.drogon.net/wiringPi cd wiringPi ./build
You can delete the
wiringPi directory once it has installed.
Putting The Hardware Together
Compiling the Software
- Clone the repository to your Raspberry Pi and cd into the directory.
- This will create the compiled binary named
- There is no step 4.
Running the Software
In order for the software to talk to the GPIO pins, you have to turn them on. This only needs to be run once per boot:
gpio load spi && gpio load i2c
Simply pass an image file that is
264x176 or smaller (the application will automatically pad the image to that size) to the binary like so:
sudo ./epaper ~/my_awesome_image.png
A few things to note here:
- It doesn't matter what format your image is in. JPG, GIF, TIFF, whatever. ImageMagick will take care of that automatically for us.
- Don't forget to
sudowhen you run the binary. The application requires
sudoaccess in order to use the GPIO pins.
This image is a full
264x176 png image.
sudo ./epaper ./test_images/velociraptor.png
This image is smaller than
264x176 so the application should pad the image to the middle of the display.
sudo ./epaper ./test_images/skookum.png
See the Contributing.md file for more information.
The portions written by Skookum Digital Works are MIT licensed
Copyright 2013 Skookum Digital Works Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Other parts (not written by us) are outlined in their respective files. Please read all licenses before using this project.
Copyright(C) 2012, Embedded Artists AB All rights reserved.
Copyright 2013 Pervasive Displays, Inc.