-
Notifications
You must be signed in to change notification settings - Fork 1
Update the Readme file with windows instruction #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lidyaa55
wants to merge
2
commits into
Open-Acidification:main
Choose a base branch
from
lidyaa55:readme_windows
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,35 +6,162 @@ | |
|
|
||
| <!-- ALL-CONTRIBUTORS-BADGE:END --> | ||
|
|
||
| ## Project Motivations | ||
| # TankControllerPico | ||
|
|
||
| Update the `TankController` code from C++ to Python and run on a Raspberry Pico. | ||
| ## Project Motivation | ||
|
|
||
| ## Requirements | ||
| The goal of this project is to migrate the original **TankController** software from **C++** to **Python** and run it on a **Raspberry Pi Pico**. | ||
|
|
||
| To set up and run this project, the system must meet the following requirements: | ||
| --- | ||
|
|
||
| - **uv**: The python project package manager must be installed. Learn more at [https://docs.astral.sh/uv/](https://docs.astral.sh/uv/). | ||
| Format contributions with `uv run black .` | ||
| - **tkinter**: The Python GUI to test locally. Often installed separately as `python3-tk`. | ||
| Verify with `python -m tkinter`. A small GUI window should appear if Tkinter is installed correctly. | ||
| # Getting Started | ||
|
|
||
| ### Mac Requirements | ||
| Follow the steps below to set up your development environment. | ||
|
|
||
| The GUI had trouble running on older version of python. | ||
| > [!NOTE] | ||
| > Windows development requires **Windows Subsystem for Linux (WSL)**. All project commands should be run inside your Linux terminal. | ||
|
|
||
| ```sh | ||
| --- | ||
|
|
||
| ## Step 1 — Install Prerequisites | ||
|
|
||
| Before cloning the project, install the following: | ||
|
|
||
| - **Python 3.14+** | ||
| - **uv** (Python package manager) | ||
| - https://docs.astral.sh/uv/ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. <> around URL. |
||
| - **Tkinter** (required for the local GUI) | ||
|
|
||
| ### Verify Tkinter | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No header, just continue text. |
||
|
|
||
| Run: | ||
|
|
||
| ```bash | ||
| python -m tkinter | ||
| ``` | ||
|
|
||
| If Tkinter is installed correctly, a small GUI window will appear. | ||
|
|
||
| --- | ||
|
|
||
| ## Step 2 — Complete Platform Setup | ||
|
|
||
| Choose the instructions for your operating system. | ||
|
|
||
| ### macOS | ||
|
|
||
| Older Python versions may have issues running the GUI. | ||
|
|
||
| Install the Tkinter package for Python 3.14: | ||
|
|
||
| ```bash | ||
| brew install python-tk@3.14 | ||
| ``` | ||
|
|
||
| ## Run in Local Environment | ||
| --- | ||
|
|
||
| To run in a local environment with mocked devices (with the UI State Machine integrated) | ||
| ### Windows | ||
|
|
||
| ```sh | ||
| #### Install WSL | ||
|
|
||
| Open **PowerShell as Administrator** and run: | ||
|
|
||
| ```powershell | ||
| wsl --install | ||
| ``` | ||
|
|
||
| Restart your computer. | ||
|
|
||
| After restarting: | ||
|
|
||
| 1. Open **Ubuntu** from the Start menu. | ||
| 2. Create your Linux username and password. | ||
| 3. Update Ubuntu: | ||
|
|
||
| ```bash | ||
| sudo apt update | ||
| sudo apt upgrade -y | ||
| ``` | ||
|
|
||
| #### Install Development Tools | ||
|
|
||
| ```bash | ||
| sudo apt install git python3 python3-pip python3-venv build-essential | ||
| ``` | ||
|
|
||
| #### Install uv | ||
|
|
||
| ```bash | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| ``` | ||
|
|
||
| Reload your shell: | ||
|
|
||
| ```bash | ||
| source ~/.bashrc | ||
| ``` | ||
|
|
||
| #### Configure VS Code | ||
|
|
||
| Install the following VS Code extensions: | ||
|
|
||
| - Remote - WSL | ||
| - Python | ||
| - Pylance | ||
|
|
||
| Once the repository has been cloned, open it from your Ubuntu terminal: | ||
|
|
||
| ```bash | ||
| code . | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Step 3 — Clone the Repository | ||
|
|
||
| Clone the repository into your Linux environment. | ||
|
|
||
| ```bash | ||
| git clone https://github.com/username/TankControllerPico.git | ||
| cd TankControllerPico | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Step 4 — Set Up the Development Environment | ||
|
|
||
| Create a virtual environment: | ||
|
|
||
| ```bash | ||
| uv venv | ||
| ``` | ||
|
|
||
| Install the project dependencies: | ||
|
|
||
| ```bash | ||
| uv pip install -e ".[dev]" | ||
| ``` | ||
|
|
||
| --- | ||
| ## Step 5 — Run the Project | ||
|
|
||
| Launch the local GUI with mocked devices: | ||
|
|
||
| ```bash | ||
| ./run_gui.sh | ||
| ``` | ||
|
|
||
| If the setup was successful, the TankController GUI should open and look similar to the example below. | ||
|
|
||
| <p align="center"> | ||
| <img | ||
| src="images/gui_screenshot.png" | ||
| alt="TankController GUI" | ||
| width="850" | ||
| /> | ||
| </p> | ||
|
|
||
|
|
||
| ## Features | ||
|
|
||
| | View Commands | Set Commands | | ||
|
|
||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove second level one header.