Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

Commit

Permalink
Merge pull request #10 from actuino/unicorn-dev3
Browse files Browse the repository at this point in the history
Python 2 dev image for the Unicorn HAT or pHAT
  • Loading branch information
alexellis committed Mar 10, 2017
2 parents ffef6a6 + ae52b68 commit 0817fed
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
13 changes: 13 additions & 0 deletions images/armhf/python2-unicornhat.dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM alexellis2/python2-armhf:2
ENTRYPOINT []
RUN apt-get -qy update && apt-get -qy --no-install-recommends install git python-dev python-pip build-essential
WORKDIR /root/
RUN git clone https://github.com/pimoroni/unicorn-hat
# But install via pip
RUN pip install unicornhat && \
rm -rf /var/lib/apt/lists/* && \
apt-get -qy clean all

WORKDIR /root/unicorn-hat/examples/

CMD ["/bin/bash"]
13 changes: 13 additions & 0 deletions images/armhf/python2-unicornhat.dev/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
NS = alexellis2
VERSION ?= 2-dev
REPO = python2-unicornhat-armhf

.PHONY: build push shell run start stop rm release

build:
docker build -t $(NS)/$(REPO):$(VERSION) .
push:
docker push $(NS)/$(REPO):$(VERSION)

default: build

30 changes: 30 additions & 0 deletions images/armhf/python2-unicornhat.dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Unicorn HAT
================================================

This image includes a full Python 2.7 dev stack, with `pip` as well as `git` and `build-essentials`. (not optimised for size)

The Pimoroni library for Unicorn HAT and pHAT is installed.

This image has to be run with the `--privileged` option like so:

docker run -it --privileged alexellis2/python2-unicornhat-dev:2

The library can auto-detect if you're using a Unicorn HAT or a Unicorn pHAT.

The default dir is the examples one, so you can test drive the demos, for instance:

python rainbow.py

See the full [examples listing](https://github.com/pimoroni/unicorn-hat/tree/master/examples)

Note that some examples require extra Python libs that were not included (Numpy is one)

About the Unicorn HAT and pHAT
------------------------------
The Unicorn is a Raspberry Pi add on that provides a nice array of (very bright) RGB LEDs.
Those are individually addressable WS2812B LEDs.

It's made by [Pimoroni](https://shop.pimoroni.com) and comes in two flavors:

* The [Unicorn pHAT](http://shop.pimoroni.com/products/unicorn-phat) I used, 8x4 LEDs, will nicely fit your Raspberry Pi Zero
* The [Unicorn HAT](http://shop.pimoroni.com/products/unicorn-hat) is dedicated to the bigger Raspberry Pi 2 and 3, and comes with 8x8 LEDs

0 comments on commit 0817fed

Please sign in to comment.