Make sure that the Pico SDK and the AutoBar repositories are sitting side-by-side. This is needed because you have to set the `PICO_SDK_PATH` environment variable and the settings require that the repositories need to be set that way. You can do this in Linux by running the following:
```bash
export PICO_SDK_PATH=../pico-sdk/
```
Alternatively, you can run the following in Powershell if you're on Windows:
```powershell
$Env:PICO_SDK_PATH = "../pico-sdk"
```
Run that command when you're in the `AutoBar` directory.
### Installation of requirements
###### Fedora Linux
First, install a C/C++ compiler and git. Install via `dnf`:
```bash
sudo dnf install gcc gcc-c++ git
```
Install Rust, `rustc` and `cargo` via rustup:
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
###### Windows
First, install [MinGW](https://osdn.net/projects/mingw/downloads/68260/mingw-get-setup.exe/) for a C/C++ compiler. Download and follow the installer.
Next, install [git](https://git-scm.com/). Download and follow the installer.
Finally, install Rust, `rustc` and `cargo` via [rustup](https://win.rustup.rs/x86_64). We assume the Windows installation is running `amd64` hardware.
### Building (for real this time)
Run the following commands in sequential order in the root of the AutoBar directory:
The first command invokes the `cargo` command, which builds the Rust library.
The next command invokes `cmake`. It's not really a build system *per se* but it generates a `Makefile` for us to use `make`.
Speaking of which, the last command that's invoked is `make` which links the library and executable together and builds them.
## Installing
Press the **BOOTSEL** button on the RP Pico until you get the RP Pico to show up as a mass storage device on your computer. From there, you can drag the `autobar.uf2` from the root of the AutoBar directory to the root of the RP Pico. It should run automatmically once that is done.