GithubHelp home page GithubHelp logo

themillerdave / oled_stats_docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mklements/oled_stats_docker

0.0 0.0 0.0 162 KB

OLED Stats display script and settings for Docker implementation

Python 89.70% Dockerfile 10.30%

oled_stats_docker's Introduction

OLED_Stats_Docker

OLED Stats display script and settings for Docker implementation on a Raspberry Pi.

The script is pre-configured for 128x64 I2C OLED display.

Installation Steps

Connect GND, VCC(3.3v), SCL, & SDA ports of the display according to the picture shown below:

(If you don't happen to have a 3.3v, a 5v will also work fine).

How to install Docker

If you do not have Docker yet. Copy and paste the following as a none-root user:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
rm get-docker.sh
exit # logout and back in for changes to take effect!

To use the docker command as a none-root user, logout and in again for the change to take effect.

Script setup

sudo raspi-config nonint do_i2c 0
docker run -d -e start=08 -e end=23 -v /etc/timezone:/etc/timezone -v /etc/localtime:/etc/localtime --network=host --device=/dev/i2c-1 --device=/dev/gpiomem --restart=on-failure --name OLED_Stats mklements/oled_stats

If you don't see anything happening on the screen, it's possible that the current time is outside of the default time set for the screen to be on (from 8:00 to 23:00). It's als possible that the wiring wasn't done properly and can be checked by doing:

docker exec -t OLED_Stats i2cdetect -y 1

It's expected to see this output:

macley@raspberrypi:~ $ docker exec -t OLED_Stats i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Set Display On/Off Time

Schedule with Cron or simalair when your container must be shutdown. The display will also be turned off!

oled_stats_docker's People

Contributors

macleykun avatar mklements 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.