8000 GitHub - monkeymademe/piritos
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

monkeymademe/piritos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PiRitos

PiRitos is a Raspberry Pi project that hosts the wonderful Star Trek: Lowerdecks inspired LCARS web interface created by the talented Rob @meWho_System47 on twitter. (You can also see Ritos and the rest of his work at mewho.com

PiRitos is using flask for hosting and socketio for websocket communication between the server and clients. What this means is anyone in the local network using their browser, can connect to the PiRitos server and interact with Robs LCARS interface. Each browser window we would refer to as the 'client'.

The magic happens with websocket communication!

SocketIO easily allows flask to talk to all the connected clients at the same time allowing the server to pass variables to the client, and the client to pass variables to the server. This 2 way communication means the all of the clients can be in sync with changes made in one of the clients since the server is the middle man.

An added bonus of having flask written in python is that we can easily add to the experience by adding LED lights or sending sensor data from the SenseHat to the clients.

Thanks to Rob @meWho_System47, he helped connecting socketio to some of the Javascript functions, when a user presses the 'Red Alert' button we have all the clients activating 'Red Alert' and also have a way to display some sensor data from the server.

What do you need for this project:

  • Raspberry Pi Zero W (any pi that can run flask should do)
  • Mote Stick LEDs from Pimoroni
  • Internet connection (Some of the JS libraries are taken from a CDN for now)
  • SenseHat (Optional for sensor data)
  • Cables, SD Card etc

Usage

  • Install Raspberry Pi OS Lite (How to click here)
  • Once installed connect to your Raspberry Pi
  • Make sure the OS is updated
sudo apt update && sudo apt upgrade -y
  • Install python3 and pip3 and flask
sudo apt-get install python3 python3-pip
  • Clone this repo
  • cd into the piritos directory
  • Create a virtual environment and install dependencies
python3 -m venv my_env
source my_env/bin/activate
pip3 install -r requirements.txt

Start the s 5E5C erver

python app.py
  • Open your browser and goto the ip of your raspberry pi/flask server

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  
0