Python information display framework aimed at e-ink devices

Related tags

Hardwareinfodisplay
Overview

My display, using a Raspberry Pi Zero W and Waveshare 6" e-paper hat

infodisplay

Modular information display framework aimed at e-ink devices.

Built using Python 3.7 and pillow. Works out of the box with IT8951-powered e-paper displays.

Setting up

  • When using an e-paper display with IT8951 controller, install GregDMeyer's IT8951 library following the instructions there.
  • Clone this repository and cd to its folder
  • Install the basic required packages using pip:
pip3 install -r requirements.txt
  • (If you plan to use the google calendar integration) install the optional packages:
pip3 install -r optional-requirements.txt
  • Copy the example config file:
cp config.ini.example config.ini
  • Make your changes to config.ini using your favourite editor.

You should now be able to run the info display using something like python3 run.py.

FontAwesome icons

The class in fontawesome.py lets you use FontAwesome icons. These are used in the Calendar widget by default.

To see the icons, download a set of FontAwesome svg's (e.g. from here) and unzip the regular, solid, and brands folders into the fa/ folder:

wget https://use.fontawesome.com/releases/v5.15.4/fontawesome-free-5.15.4-desktop.zip
unzip fontawesome-free-5.15.4-desktop.zip
mv fontawesome-free-5.15.4-desktop/svgs/* fa/

Running as a service

A sample systemd unit file is provided in infodisplay.service. This is set up so the service only starts after an NTP time sync is established. Raspberry Pi's don't have a hardware RTC, so system time can be wildly inaccurate until they get the network time.

  • Edit infodisplay.service to reflect where you cloned the repository to, and what user it should run as. (default: /home/pi/infodisplay and pi)
  • Enable the systemd time-sync.target:
sudo systemctl enable systemd-time-wait-sync
  • Copy your unit file:
sudo cp infodisplay.service /etc/systemd/system/
  • Reload systemd:
sudo systemctl daemon-reload
  • Enable autostart of the service:
sudo systemctl enable infodisplay.service
  • Finally, start the service:
sudo systemctl start infodisplay.service

Google Calendar integration

To get events from your Google Calendar you need a Google Cloud Platform project, OAuth credentials and finally a token. Follow the 'Prerequisites' section of this tutorial and you should have a credentials.json file at the end.

The following needs to be done on your desktop computer, as a dialog will pop up for authorization:

  • Clone this repo.
  • Install the optional requirements using pip3 install -r optional-requirements.txt.
  • Copy your credentials.json to the util folder.
  • cd to the util folder.
  • Run python3 get-google-calendars.py.

This script should give you the ID's of the calendars synced to your account. Pick the ones you want and add them to the config.ini. There should now also be a token.json file in the directory, copy this to your main infodisplay folder.

Structure

Have a look through the example config file. This has one main section with global configuration parameters, all other sections are specific to widgets.

The display is divided into a grid, where each widget is given a canvas spanning one or more grid cells. The scheduler calls each widget to update their canvas, pastes updated widgets onto the global canvas, and triggers a display update at the right time.

The most basic example of a widget is given in Dummy.py. Widgets are automatically loaded if their name exists as a section in your config.ini. These sections should have names matching files in the widgets/ folder with corresponding widget classes that go by the same name (e.g. there is a 'Dummy' section in config.ini and widgets/Dummy.py has a class named Dummy).

Looking to add support for your own type of (e-ink) display? You should only have to modify display.py. Keep in mind that the default canvas is of image mode L, or 8-bit greyscale. You will have to modify this to suit your display.

Notes

In due time this information should be moved to the wiki section and expanded.

Owner
Niek Blankers
Niek Blankers
Estimation of whether or not the persons given information will have diabetes.

Diabetes Business Problem : It is desired to develop a machine learning model that can predict whether people have diabetes when their characteristics

Barış TOKATLIOĞLU 0 Jan 20, 2022
NYCT-GTFS - Real-time NYC subway data parsing for humans

NYCT-GTFS - Real-time NYC subway data parsing for humans This python library provides a human-friendly, native python interface for dealing with the N

Andrew Dickinson 37 Dec 27, 2022
Easyeda2kicad.py - Convert any LCSC components (including EasyEDA) to KiCad library

easyeda2kicad.py A Python script that convert any electronic components from LCSC or EasyEDA to a Kicad library Installation git clone https://github.

uPesy Electronics 150 Jan 06, 2023
Workshop for student hackathons focused on IoT dev

Scenario: The Mutt Matcher (IoT version) According to the World Health Organization there are more than 200 million stray dogs worldwide. The American

Microsoft 15 Aug 10, 2022
Play music on Raspberry Pi Pico Without CPU involvement

MicroPython_PIO_Music_DMA Play music on Raspberry Pi Pico Without CPU involvement This is based on PIOBeep (https://github.com/benevpi/pico_pio_buzz)

3 Nov 27, 2022
An open source two key macro-pad modeled to look like a cartoony melting popsicle

macropopsicle An open source two key macro-pad modeled to look like a cartoony melting popsicle. Build instructions Parts List -1x Top case half (3D p

17 Aug 18, 2022
Pinion — Nice-looking interactive diagrams for KiCAD PCBs

Pinion — Nice-looking interactive diagrams for KiCAD PCBs Pinion is a simple tool that allows you to make a nice-looking pinout diagrams for your PCBs

Jan Mrázek 297 Jan 06, 2023
Pure micropython ESP32 SPI driver for sdcard and screen at the same SPI bus

micropython-esp32-spi-sdcard-and-screen-driver Proof of concept of Pure micropython espidf SPI driver for sdcard with screen at the same SPI bus (exam

Thomas Favennec 7 Mar 14, 2022
LT-OCF: Learnable-Time ODE-based Collaborative Filtering, CIKM'21

LT-OCF: Learnable-Time ODE-based Collaborative Filtering Our proposed LT-OCF Our proposed dual co-evolving ODE Setup Python environment for LT-OCF Ins

Jeongwhan Choi 15 Dec 28, 2022
A Macropad using the Raspberry Pi Pico, programmed with CircuitPython.

A Macropad using the Raspberry Pi Pico, programmed with CircuitPython.

15 Oct 14, 2022
Hardware: CTWingSKIT_BC28 Development Toolkit

IoT Portal Monitor Tools hardware: CTWingSKIT_BC28 Development Toolkit serial port driver: ST-LINK hardware development environment: Keli 5 MDK IoT pl

Fengming Zhang 1 Nov 07, 2021
Python code written to utilize the Korlan usb2can hardware to send and receive data over the can-bus on a 2008 Nissan 350z

nissan_ecu_hacking Python code written to utilize the Korlan usb2can hardware to send and receive data over the can-bus on a 2008 Nissan 350z My goal

Liam Goss 11 Sep 24, 2022
This tool emulates an EMV-CAP device, to illustrate the article "Banque en ligne : à la decouverte d'EMV-CAP" published in MISC

About This tool emulates an EMV-CAP device, to illustrate the article "Banque en ligne : à la decouverte d'EMV-CAP" published in MISC, issue #56 and f

Philippe Teuwen 28 Nov 21, 2022
ENC28J60 Ethernet chip driver for MicroPython (RP2)

micropy-ENC28J60 ENC28J60 Ethernet chip driver for MicroPython v1.17 (RP2) Rationale ENC28J60 is a popular and cheap module for DIY projects. At the m

11 Nov 16, 2022
Modi2-firmware-updater - MODI+ Firmware Updater With Python

MODI+ Firmware Updater 실행 준비 python3(파이썬3.9 혹은 그 이상의 버전)를 컴퓨터에 설치 python3 -m pip

LUXROBO 1 Feb 04, 2022
Controlling fireworks with micropython

Controlling-fireworks-with-micropython How the code works line 1-4 from machine

Montso Mokake 1 Jan 08, 2022
Raspberry Pi Pico Escape Room game.

Pico Escape Room Raspberry Pi Pico Escape Room game. Parts Raspberry Pi Pico Set of 2 x 20-pin Headers for Raspberry Pi Pico 4PCS Breadboards Kit Incl

Kevin Thomas 5 Feb 02, 2022
DOS-like OS for RP2040 basic microcontroller boards

Micropython DOS-like OS for RP2040 microcontroller boards. Check out the demo video at https://www.youtube.com/watch?v=Az_oiq8GE4Y To start the OS typ

RetiredWizard 58 Dec 27, 2022
PlatformIO development platform for GSM modules

PlatformIO development platform for GSM modules Supported Modules Quectel M66 OpenCPU Arduino - TODO other - in progress... Supported Boards Comet M66

Georgi Angelov 5 Aug 06, 2022
Home solar infrastructure (with Peimar Inverter) monitoring based on Raspberry Pi 3 B+ using Grafana, InfluxDB, Custom Python Collector and Shelly EM.

raspberry-solar-mon Home solar infrastructure (with Peimar Inverter) monitoring based on Raspberry Pi 3 B+ using Grafana, InfluxDB, Custom Python Coll

cislow 10 Dec 23, 2022