1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:15 +02:00

update oled-arm

This commit is contained in:
kev 2017-05-29 11:55:32 +08:00
parent d8c5610696
commit 150cf94bb0
5 changed files with 44 additions and 23 deletions

View File

@ -1,5 +1,5 @@
#
# Dockerfile for oled
# Dockerfile for oled-arm
#
FROM easypi/alpine-arm
@ -24,4 +24,11 @@ RUN set -xe \
freetype-dev \
jpeg-dev
WORKDIR /code
RUN set -xe \
&& apk add --no-cache curl tar \
&& curl -sSL https://github.com/rm-hull/luma.examples/archive/master.tar.gz | tar xz --strip 2 luma.examples-master/examples \
&& apk del --purge curl tar
ENTRYPOINT ["python"]

36
oled-arm/README.md Normal file
View File

@ -0,0 +1,36 @@
oled
====
## Setup
```
OLED Pin | Name | Remarks | RPi Pin | RPi Function
---------+------+---------+---------+--------------
1 | GND | Ground | P01-6 | GND
2 | VCC | +3.3V | P01-1 | 3V3
3 | SCL | Clock | P01-5 | GPIO 3 (SCL)
4 | SDA | Data | P01-3 | GPIO 2 (SDA)
```
```bash
# hello world
$ docker-compose run --rm oled < demo.py
```
```
# list all examples
$ docker-compose run --rm --entrypoint ls oled
# clock
$ docker-compose run --rm oled clock.py
# pi logo
$ docker-compose run --rm oled pi_logo.py
# game of life
$ docker-compose run --rm game_of_life.py
```
## Todo
- [ ] Implement RESTful api as default CMD.

View File

@ -1,22 +0,0 @@
oled
====
## Demo
```
OLED Pin | Name | Remarks | RPi Pin | RPi Function
---------+------+---------+---------+--------------
1 | GND | Ground | P01-6 | GND
2 | VCC | +3.3V | P01-1 | 3V3
3 | SCL | Clock | P01-5 | GPIO 3 (SCL)
4 | SDA | Data | P01-3 | GPIO 2 (SDA)
```
```bash
# Show "hello world" on oled display module
$ cat demo.py | docker-compose run --rm oled
```
## Todo
- [ ] Implement RESTful API