GithubHelp home page GithubHelp logo

lupin3000 / rgb-matrix-led Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 32 KB

Simple games for RGB Matrix LED (from Adafruit)

Home Page: https://softwaretester.info

Python 100.00%
python raspberry-pi rgb-matrix-bonnet rgb-matrix-led adafruit gpio matrix-panel

rgb-matrix-led's Introduction

RGB Matrix LED - Games

Requirements

  • Adafruit RGB Matrix LED (min. 1x 64x32)
  • Adafruit RGB Matrix Bonnet for Raspberry Pi
  • Raspberry Pi (min. Zero WH)
  • USB adapter (USB to Micro USB)

Installation

In case your RGB Matrix LED installation is already done, you only need to ensure Python evdev and git is installed.

# change to home directory (optional)
$ cd ~

# update packages (optional)
$ sudo apt update && sudo apt upgrade -y

# get rgb matrix installation script
$ curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/main/rgb-matrix.sh >rgb-matrix.sh

# run installation
$ sudo bash rgb-matrix.sh

Please be patient with your installation! This task can take some time. Also verify that installation was successful before you continue.

# install needed python packages and git
$ sudo apt install -y git python3-evdev

Done ... now clone the repository and enjoy the games.

# clone repository
$ git clone https://github.com/Lupin3000/RGB-Matrix-LED.git

# change into repository directory
$ cd RGB-Matrix-LED/

Controller

To ensure your controller is connected and can be used, verify the input devices.

In case the input will not be discovered, please check your USB cable and USB port on Raspberry Pi!

# verify current input devices (optional)
$ ls -la /dev/input/

Because you should run the Python scripts with sudo permission, it's good to add the root user into input group. Otherwise, it will show error messages.

# add root to input group
$ sudo usermod -a -G input root

Inside directory usb are some files to help with your controller. In case you don't have same you can use these scripts, to configure any other brand. But also adaptations inside lib/stadia_controller will be needed!

# list all devices (optional)
$ sudo python -B usb/show_all_devices.py

# show all events
$ sudo python -B usb/show_device_events.py

Execute games

All games are started very in same way:

# run Pong
$ sudo python -B Pong.py

# run Snake
$ sudo python -B Snake.py

# run Starfighter
$ sudo python -B Starfighter.py

You can stop these games also with CTRL + c or just wait to lose.

Participate the project

You are very welcome to take part in this project! No matter whether you want to develop new games or expand / optimize existing games. There are very few rules:

  • Games must be developed in MicroPython
  • No insults are allowed
  • The code should be at least somewhat documented (e.g. DocStrings)
  • Anyone who destroys something has to fix it again

rgb-matrix-led's People

Contributors

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