Skip to content

dnywh/art-press

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Art Press

Art Press Sequence.gif

Art Press is a Pi Frame app. It prints a random, public domain, item from the Art Institute of Chicago’s collection to an e-ink display via Raspberry Pi. By default it selects only items classified as “woodcut” to suit the qualities (and limitations) of e-ink.

Art Press relies on the Art Institute of Chicago’s API to search for random art and its IIIF Image API to render a cropped image.

Prerequisites

To run Art Press you need to first:

  1. Join a Wi-Fi network on your Raspberry Pi
  2. Enable SSH on your Raspberry Pi
  3. Plug in a Waveshare e-Paper or similar display to your Raspberry Pi

Art Press works great with Pi Frame, which includes the Waveshare drivers amongst other things like a scheduling template. If you’d prefer not to use Pi Frame, you’ll need to upload the Waveshare e-Paper display drivers (or similar) to your Raspberry Pi in a lib directory that is a sibling of Art Press’. Here's an example:

.
└── art-press
└── lib
    └── waveshare_epd
        ├── __init__.py
        ├── epdconfig.py
        └── epd7in5_V2.py

Either way, Waveshare displays require some additional setup. See the Hardware Connection and Python sections of your model’s manual.

Get started

If you haven’t already, copy all the contents of this Art Press repository over to the main directory of your Raspberry Pi.

Set the display driver

Look for this line as the last import in app.py:

from waveshare_epd import epd7in5_V2 as display

Swap out the epd7in5_V2 for your Waveshare e-Paper display driver, which should be in the lib directory. Non-Waveshare displays should be imported here too, although you’ll need to make display-specific adjustments in the handful of places display is called further on.

Install required packages

See requirements.txt for a short list of required packages. Install each package on your Raspberry Pi using sudo apt-get. Here’s an example:

sudo apt-get update
sudo apt-get install python3-pil
sudo apt-get install python3-requests

Run the app

Run Art Press just like you would any other Python file on a Raspberry Pi:

cd art-press
python3 app.py

Art Press is noisy by default. Look for the results in Terminal.


Usage

Run on a schedule

See Pi Frame for a crontab template and usage instructions.

Design options

Art Press contains several visual design parameters in app.py.

Option Type Description
imageQuality String Corresponds to the IIF quality parameter with options "default", "gray", and "bitonal".
preferCrop Boolean Crops to the center of the original image if true. Uses maskWidth and maskHeight.

Save to folder

Art Press contains an exportImages boolean option in app.py. When True it saves both an image and text file to a timestamped directory within an exports directory.