Skip to content

Commit

Permalink
Install Checkbox Display Server
Browse files Browse the repository at this point in the history
  • Loading branch information
hugs committed Sep 10, 2024
1 parent 7262390 commit 1a81cb7
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion source/machine-setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def parse_arguments():
shell("sudo apt-get upgrade -y")
shell("sudo apt-get install -y expect git vim python3-pip")
shell("sudo apt-get install -y --upgrade python3-setuptools")
shell("sudo apt-get install -y python3-venv")
shell("sudo apt-get install -y python3-venv python3-pil python3-numpy")
shell("sudo apt install -y dnsmasq iptables")

# Raspberry Pi Config
Expand All @@ -52,6 +52,10 @@ def parse_arguments():
shell("sudo raspi-config nonint do_i2c 0") # Enable I2c
# Install libcamera libraries
shell("sudo apt-get install -y libcamera-v4l2 libcamera-tools libcamera-apps")
# For Checkbox Display Server
shell("sudo apt install -y fonts-dejavu")
shell("sudo apt install -y i2c-tools libgpiod-dev python3-libgpiod")

##########################################

# Install OCR packages
Expand Down Expand Up @@ -142,6 +146,23 @@ def parse_arguments():
# Install Tapster LCD display test script
shell("""cd /home/tapster/Projects/valet;
git clone https://gist.github.com/hugs/559aa69d8870630bda790e77847f9847 setup-test;""")

# For Checkbox Display Server
shell("""cd /home/tapster/Projects/valet;
source env/bin/activate;
git clone https://github.com/tapsterbot/checkbox-display-server.git;
cd checkbox-display-server;
python3 -m pip install --upgrade --force-reinstall spidev;
python3 -m pip install --upgrade -r requirements.txt;""")

# Install Checkbox Display Server Service
shell("""cd /home/tapster/Projects/valet/checkbox-display-server/service;
sudo cp checkbox-display-server.service /etc/systemd/system/checkbox-display-server.service;
sudo chmod 644 /etc/systemd/system/checkbox-display-server.service;
sudo systemctl daemon-reload;
sudo systemctl start checkbox-display-server;
sudo systemctl enable checkbox-display-server;""")

##########################################

# Install Checkbox server
Expand Down

0 comments on commit 1a81cb7

Please sign in to comment.