Install Python libraries, this will take a bit:

sudo apt install vlc python3-evdev python3-alsaaudio python3-vlc python3-opencv python3-toml fbi

Clone PiGlass v2 Repo:

git clone

Copy service file to the system location and enable:

sudo cp /home/pi/PiGlassv2/button.service /etc/systemd/system/
sudo systemctl enable button.service

The bumpers are volume up/down.
The dpad with up/down will cycle options.
Select will launch the currently selected option.
Press Y to toggle rainbow mode.

Everything the launcher does is controlled by a file called piglasscmds.toml.

The working directory is /home/pi/PiGlassv2.

The format of the launcher's file is:
[Title]        The name of the option you want to display.
color         The color for this item for rainbow mode.
cmd          The command you want to run/shell script/program.
process    The processes to kill related to the command.

color = "red"
cmd = "sudo ttyecho -n /dev/tty1 kodi"
process = "kodi.bin_v7"

color = "green"
cmd = "sudo ttyecho -n /dev/tty1 emulationstation"
process = "retroarch emulationstatio"

["Funny Camera"]
color = "purple"
cmd = "python3"
process = "python3"

["Video w/Audio"]
color = "brown"
cmd = "sh"
process = "raspivid ffmpeg"

You can test a command before you add it by using this command followed by yours, if your command is more than one word (has spaces) make sure to put it in quotes

sudo ttyecho -n /dev/tty1 "sudo apt update"

This guide was first published on Apr 05, 2022. It was last updated on 2022-04-05 19:10:28 -0400.

This page (PiGlass v2 Software Tutorial) was last updated on May 15, 2022.

Text editor powered by tinymce.