GithubHelp home page GithubHelp logo

mgk / edify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from veebch/edify

0.0 0.0 0.0 3.83 MB

A quote scraper on a 2.7 inch epaper screen

License: GNU General Public License v3.0

Python 100.00%

edify's Introduction

Passive Brainfood - Neverending quotes

Action Shot

YouTube Channel Views

This is a script that uses similar smarts to the crypto ticker, but to display randomly-chosen highly-rated quotes from Reddit (r/quotes), a word of the day or a item from a flashcard text file (selected at random, according to weightings in config file config.yaml)

Getting started

Prerequisites

(These instructions assume that your Raspberry Pi is already connected to the Internet, happily running pip and has python3 installed)

If you are running the Pi headless, connect to your Raspberry Pi using ssh.

First, enable spi (0=on 1=off)

sudo raspi-config nonint do_spi 0

Install & Run

Now clone the required software (Waveshare libraries and this script)

cd ~
git clone https://github.com/waveshare/e-Paper
git clone https://github.com/veebch/edify.git

Move to the edify directory, copy the example config to config.yaml and move the required part of the waveshare directory to the edify directory

cd edify
cp config_example.yaml config.yaml
cp -r /home/pi/e-Paper/RaspberryPi_JetsonNano/python/lib/waveshare_epd .
rm -rf /home/pi/e-Paper

Install the required modules using pip:

python3 -m pip install -r requirements.txt

If you'd like the script to persist once you close the session, use screen.

Start a screen session:

screen bash

Run the script using:

python3 edify.py

Detach from the screen session using CTRL-A followed by CTRL-D

The unit will now pull data every 60 minutes (or whatever is specified in the configuration file) and update the display.

Add Autostart

Rather than running via screen, if you'd like the script to start automatically every time the Pi is plugged in to a power supply, you can set up a systemd service with the following:

cat <<EOF | sudo tee /etc/systemd/system/edify.service
[Unit]
Description=edify
After=network.target

[Service]
ExecStart=/usr/bin/python3 -u /home/pi/edify/edify.py
WorkingDirectory=/home/pi/edify/
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi

[Install]
WantedBy=multi-user.target
EOF

Now, simply enable the service you just made and reboot

sudo systemctl enable edify.service
sudo systemctl start edify.service

sudo reboot

Links

You can buy a fully assembled Audrey or a frame for one you've built at veeb.ch

Troubleshooting

Some people have had errors on a clean install of Rasbian Lite on Pi. If you do, run:

sudo apt-get install libopenjp2-7
sudo apt-get install libqt5gui5
sudo apt-get install python-scipy
sudo apt install libatlas-base-dev

and re-run the script.

If the unit is freezing, try switching to another power supply. I've lost count of the number of times I've spent half a day trying to debug what turned out to be a dodgy power supply.

Video

Video

Licencing

GNU GENERAL PUBLIC LICENSE Version 3.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.