From 66443f0c9c625b70112683f008f3167b25ba3862 Mon Sep 17 00:00:00 2001 From: ATATC Date: Fri, 9 Feb 2024 12:51:00 -0500 Subject: [PATCH] Docs. (#45) --- README.md | 14 +++++++++++--- scripts/python-install.sh | 3 ++- scripts/setup.sh | 8 ++++++++ 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 scripts/setup.sh diff --git a/README.md b/README.md index 1c53c0ad..77f3d2a1 100644 --- a/README.md +++ b/README.md @@ -145,15 +145,23 @@ systemctl daemon-reload systemctl enable leads_vec_rc ``` -### Configurations +## Environment Setup -The configuration is a json file that has the following columns. You can have an empty configuration file like the following as all the columns are optional. +This section helps you set up the exact environment we have for the VeC project. A more detailed guide of reproduction is available on [https://leads.projectneura.org](https://leads.projectneura.org), but first of all, we run an Ubuntu 22.04 LTS on a Raspberry Pi 4 Model B 8GB. After the OS is set up, clone the repository or download the scripts from [releases](releases) (only stable releases provide scripts). + +You can simply run "[setup.sh](scripts/setup.sh)" and it will install everything for you. If anything goes wrong, you can also manually install everything. + +If you install Python using the scripts, you will not find `python ...`, `python3 ...`, `pip ...`, or `pip3 ...` working because you have to specify the Python version such that `python3.11 ...` and `python3.11 -m pip ...`. + +## Configurations + +The configuration is a JSON file that has the following columns. You can have an empty configuration file like the following as all the columns are optional. ```json {} ``` -Note that a purely empty file could cause error. +Note that a purely empty file could cause an error. | | Type | Usage | Used By | Default | | ------------------------- | ------- | ------------------------------------------------------------ | ------------ | ------------- | diff --git a/scripts/python-install.sh b/scripts/python-install.sh index 2f5f1664..970bdff7 100644 --- a/scripts/python-install.sh +++ b/scripts/python-install.sh @@ -6,4 +6,5 @@ fi sudo su apt update apt install python3.11 -apt install python3-rpi.gpio \ No newline at end of file +apt install python3-tk +apt install python3-rpi.gpi \ No newline at end of file diff --git a/scripts/setup.sh b/scripts/setup.sh new file mode 100644 index 00000000..4fafeeb1 --- /dev/null +++ b/scripts/setup.sh @@ -0,0 +1,8 @@ +if ! sudo -v &>/dev/null; +then + echo "Error: This script requires root permission" + exit 1 +fi +sudo su +./python-install.sh +python3.11 -m pip install pysimplegui keyboard RPi.GPIO pyserial leads \ No newline at end of file