Skip to content

cl-ire/LED_Matrix_

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LED NeoPixel Matrix Controller with Raspberry Pi Pico W2

frontend

picture picture

This project allows you to control a 16x16 LED NeoPixel matrix using a Raspberry Pi Pico W2.

Features:

  • Control LED matrix displays through a web interface
  • Pixel art editor to create static and animated images
  • Interact with GPIO buttons on the Raspberry Pi to control the matrix
  • Backend API to communicate with the NeoPixel matrix
  • Fully containerized using Docker for seamless deployment

Components

Build Guide

Print the Case

case1 case2 case3

The STEP files for the case are provided here

Wiring

Wire up all the components according to the following diagram:

wiring

Some LED matrices have a dedicated power input — if available, use it.

Make sure the wires are routed through the case before connecting the DC power jack.

Tape the matrix to the case with double-sided tape and secure the buttons in place

picture picture

Note About Matrix Choice

The LED matrix used in this example functions like a light strip, so the LEDs need to be addressed as an array according to the following scheme:

2 1 0 
3 4 5
8 7 6

If you want to use a different matrix, you might need to adapt the get_index function in LEDMatrix

Installation Guide

Installing Ubuntu Server 22.04.3 LTS (64-bit) on Raspberry Pi

Download and install the official Raspberry Pi Imager from (https://www.raspberrypi.com/software). Choose the following parameters:

  • Operating System: Other general-purpose OS/Ubuntu/Ubuntu Server 22.04.3 LTS (32-bit).

in the Advanced Options Menu

  • Set hostname: LED_Matrix
  • Enable SSH with pasword authentication
  • Username: led
  • Password:
  • Configure a wireles LAN

Connect Over SSH

In your command line, type:

ssh led@<your-ip-adress>

Then enter your password.

Install Docker

Install dependencies:

sudo apt install apt-transport-https ca-certificates curl software-properties-common

Add Docker’s official GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Add Docker repository:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Update:

sudo apt update

Install Docker:

sudo apt install docker-ce
sudo apt install docker-compose-plugin

Varify instalation:

docker --version
docker-compose --version

Enable Docker to start on boot:

sudo systemctl enable docker

Add the User to the Docker Group

sudo usermod -aG docker led  
logout
groups

Set firewal rules

sudo apt install ufw
sudo ufw enable
sudo ufw allow 80/tcp
sudo ufw allow 8000/tcp
sudo ufw status

Start the Container

First, configure the .env file:

cd ~/LED_Matrix_/src/Docker/
nano .env

Add the following lines:

# .env file
LATITUDE=
LONGITUDE=
TZ=Europe/Berlin  # Optional timezone setting
MATRIX_ROTATION=90   # set rotation to 0, 90, 180, 270
SWAP_BUTTONS="true"  # Swaps buttons "true" or "false"

Start the container:

cd ~/LED_Matrix_/src/Docker/
docker compose up -d

Now you can access the application at:

http://LED_Matrix.local

additional comands

Stop the container:

cd ~/LED_Matrix_/src/Docker/
docker compose down

Rebuild the container:

cd ~/LED_Matrix_/src/Docker/
docker compose build
docker compose up -d

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published