Giter Club home page Giter Club logo

pixelpi's Introduction

pixelpi

Games and Animations on 16x16 LEDs

16x16 LED matrix

This is a collection of python scripts that run animations and games on a 16x16 matrix of WS2812B LEDs (aka Neopixel). The project is inspired by and compatible to Jeremy Williams' Game Frame.

Hardware

Here is a set of photos of the hardware I use and a parts list with approximate costs:

  • 300 LEDs, WS2812B, 60/m 38 €
  • Frame 32 €
  • Raspberry Pi Model B 25€
  • Power Supply 5V 10A 12,07 €
  • Wifi-Stick 10 €
  • Eboy animations from ledseq.com 9€
  • Cardboard for the grid 2 €
  • Level shifter 1 €
  • 5V jack 1 €
  • Plywood 1 €
  • Wire, solder, connectors, heat shrink tube, etc

(131€ total, about $150)

LED strips

I recommend you use this tutorial to set up the LED hardware. Make sure you install rpi_ws281x as explained in the tutorial.

Then copy this repository somewhere to the SD card, copy your andimations to the sd card and run a script.

You can edit the Screen.py file to default to the LED strip settings you used in the neopixel tutorial (especially pin and brightness).

I'm using a Raspberry Pi Model B, if you want to use a Raspberry Pi 2 (B), try this fork of the rpi_ws281x module.

LED layout

The Screen.py script expects your LED strip to be layed out like this:

-> -> -> -> -> -> -> -> -> -> -> -> -> -> -> ->
<- <- <- <- <- <- <- <- <- <- <- <- <- <- <- <-
-> -> -> -> -> -> -> -> -> -> -> -> -> -> -> ->
...

If you have a different setup, you can edit the Screen.py file to translate the 16x16 matrix on your LED strip.

Software

To set up the software, clone this repository on your Raspberry Pi. Rename the file config.ini.example to config.ini. Make sure, the neopixel library is installed. This project uses Python 2.7.

Animations

Place your animations in a folder called animations in the repository. For each animation, a file /animations/animation_name/0.bmp should exist.

Here are the Eboy animations and a forum for fan-made Game Frame animations.

Take a look at the files example_animation.py and example_cycle.py to display single or multiple animations.

Gamepad

The current gamepad code probably only works with my logitech gamepad. I'm planning to make more generic gamepad support. Until then, you need to edit the gamepad.py file and make it work with your gamepad.

Menu

The file menu.py provides a visual menu to select from the available modules such as animations and games. For me, this is the default way of using the LED screen. You need a gamepad for this to work.

Virtual hardware

You can test all software without a Raspberry Pi, Gamepad or LED matrix. To do so, set up the software as described above and edit the config.ini file. Set virtualhardware to true. Try to run menu.py, a window with a simulated screen should open. Note that this requires pygame which you may need to install.

pixelpi's People

Contributors

marian42 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.