Giter VIP home page Giter VIP logo

bpi-r2-ssd1306-display's Introduction

BPI-R2 stats python program for SSD1306 OLED display

Intro

The code found in this repo is based on the stats.py file found in Adafruit's Python SSD1306 repo. It has been customized by xptsp to use Python calls only, thereby freeing it from use of Bash calls. It has only be tested on a Debian 10 install on the Banana Pi R2, and may require modifications to work on other OSes, kernels, boards, and/or architectures.

Tested With

Expected GPIO configuration

  • VCC is on pin 1 (3.3V)
  • GND is on pin 9
  • SDA on pin 27
  • SCL on pin 28

Display In Action

Script Customization

Inside the stats.py script, there are several lines to change. These lines control which interface each of the 4 icons represent.

wan_interface = "wan"
w24_interface = "wlp1s0"
w5G_interface = "wlp1s0"
vpn_interface = "vpn_in"

Further modification is planned to modularize the text and images.

Installation

Install required system packages:

apt install -y python3-pip libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk

Install required Python packages via PIP:

python3 -m pip install --upgrade pip wheel setuptools
python3 -m pip install Adafruit-SSD1306 Adafruit-BBIO Adafruit-GPIO Adafruit-PureIO Pillow psutil

Clone the repo, install and enable the service file:

git clone https://github.com/xptsp/bpi-r2-ssd1306-display /opt/stats
cp /opt/stats/stats.service /etc/systemd/system/stats.service
systemctl enable stats
systemctl start stats

bpi-r2-ssd1306-display's People

Contributors

frank-w avatar xptsp avatar

Watchers

 avatar

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.