Serveur Web

LESP : Linux, Nginx, SQLite et PHP

source

sudo apt install nginx -y

// https://getgrav.org/blog/raspberrypi-nginx-php7-dev

php

sudo apt install -y php7.0-fpm php7.0-sqlite3 php-apcu

base de donnees

sudo apt install -y sqlite3

LAMP

https://www.raspberrypi.org/blog/build-social-media-follower-counter/

sudo apt install apache2 -y
sudo apt install php -y
sudo service apache2 restart

Serveur accessible

Installer la bdd

sudo apt-get install mysql-server php-mysql -y

Sécuriser la bdd

sudo mysql_secure_installation

Installer un outil de gestion de base de donnée

sudo apt-get install phpmyadmin -y

Créer l’utilisateur RGBMatrix http://Adresse_ID_de_votre_Pi/phpmyadmin

flask

sudo apt install python3-flask

Joystick

https://www.raspberrypi-spy.co.uk/2014/04/using-a-joystick-on-the-raspberry-pi-using-an-mcp3008/

GPIO

Gpio Zero

https://gpiozero.readthedocs.io/en/stable/

Installation

source

sudo apt update
sudo apt upgrade
sudo apt install python3-gpiozero

ou Circuit Python

https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/circuitpython-raspi

Installation

sudo apt update
sudo apt upgrade
sudo apt install git
git clone https://github.com/hzeller/rpi-rgb-led-matrix.git
cd rpi-rgb-led-matrix
make

Disable the sound module

Switch off on-board sound (dtparam=audio=off in /boot/config.txt) then reboot.

Testing

cd rpi-rgb-led-matrix/examples-api-use
sudo ./demo -D0

Utiliser avec Python

source

cd rpi-rgb-led-matrix/bindings/python
sudo apt-get update && sudo apt-get install python3-dev python3-pillow -y
make build-python PYTHON=$(which python3)
sudo make install-python PYTHON=$(which python3)

Tester

cd rpi-rgb-led-matrix/bindings/python/samples sudo ./runtext.py -t “hello je suis un texte”

Wiring

https://github.com/hzeller/rpi-rgb-led-matrix/blob/master/wiring.md

Projets avec matrix

https://learn.adafruit.com/ledgames-beaglebone-black-64x64-led-game

Raspberry Pi LED Matrix Display

by Adafruit

youtube tuto

Web app

vu sur adafruit

by I like to make stuff

youtube tuto

Supprimer le sudo

https://raspberrypi.stackexchange.com/a/46235

Autres ressource

quelques images quelques gifs

http://frederickvandenbosch.be/?p=2079

Python

from rgbmatrix import RGBMatrix, RGBMatrixOptions
# Configuration for the matrix
options = RGBMatrixOptions()
options.rows = 16
options.chain_length = 1
options.parallel = 1
options.hardware_mapping = 'regular'

Available options

brightness
chain_length
cols
rows
daemon
disable_hardware_pulsing
drop_privileges
gpio_slowdown
hardware_mapping
inverse_colors
led_rgb_sequence
multiplexing
parallel
pixel_mapper_config
pwm_bits
pwm_dither_bits
pwm_lsb_nanoseconds
row_address_type
scan_mode
show_refresh_rate
matrix = RGBMatrix(options = options)

matrix.Clear()
matrix.height
matrix.width
matrix.SetPixel(x,y,r,g,b)

Nokia

sudo apt install python3-pip
pip3 install nokia

Projets

https://www.raspberrypi.org/blog/build-social-media-follower-counter/

RGB PCB

liste de matériels