|
| 1 | +# Getting Started |
| 2 | + |
| 3 | +The [Harp Hobgoblin](https://github.com/harp-tech/device.hobgoblin) is a simple multi-purpose device designed for learning the fundamentals of the Harp ecosystem. The principles demonstrated in this tutorial series can also be applied to other Harp devices. |
| 4 | + |
| 5 | +{width=300} |
| 6 | +*<small>Pico2 board mounted on Gravity: Expansion Board</small>* |
| 7 | + |
| 8 | +> [!NOTE] |
| 9 | +> The `Hobgoblin` can be interfaced with a variety of input and output modules using the [Gravity: Expansion Board](https://www.dfrobot.com/product-2393.html). For more information on how to assemble the board, along with recommended sensor kits, refer to the resources in the [harp-tech/device.hobgoblin](https://github.com/harp-tech/device.hobgoblin) repository. |
| 10 | +
|
| 11 | +## Installation |
| 12 | + |
| 13 | +- Install [Bonsai](https://bonsai-rx.org/docs/articles/installation.html). |
| 14 | +- Install the `Harp.Hobgoblin` package by searching for it in the [Bonsai package manager](https://bonsai-rx.org/docs/articles/packages.html). |
| 15 | + |
| 16 | +## Flashing the firmware |
| 17 | + |
| 18 | +- Download the latest version of the [firmware](https://github.com/harp-tech/device.hobgoblin/releases/) that matches your Pico board. |
| 19 | +- Press-and-hold the Pico `BOOTSEL` button while you connect the device to your computer's USB port. The Pico will be mounted as a new flash drive. |
| 20 | +- Drag-and-drop the `.uf2` file into the drive. |
| 21 | + |
| 22 | +## Testing the device |
| 23 | + |
| 24 | +:::workflow |
| 25 | + |
| 26 | +::: |
| 27 | + |
| 28 | +- Connect a push button to analog input channel `0` (`GP26`) on the `Hobgoblin`. |
| 29 | +- Set the `PortName` property of the [`Hobgoblin`](xref:Harp.Hobgoblin.Device) operator to the communications port of the `Hobgoblin` (e.g. COM7). |
| 30 | +- Run the workflow and double-click the output of `AnalogInput0`. The value should change when the push button is pressed. |
| 31 | + |
| 32 | +## Installing harp-python |
| 33 | + |
| 34 | +The [harp-python](../articles/python.md) library provides a low-level interface to read and manipulate data from Harp devices. You can create a Python environment with `harp-python` using [`uv`](https://docs.astral.sh/uv/): |
| 35 | + |
| 36 | +- Install [`uv`](https://docs.astral.sh/uv/). |
| 37 | +- Create a new folder for the project. |
| 38 | +- Navigate to the folder and initialize a new environment: |
| 39 | + |
| 40 | +```cmd |
| 41 | +uv venv |
| 42 | +``` |
| 43 | + |
| 44 | +- Install `harp-python` as a dependency: |
| 45 | + |
| 46 | +```cmd |
| 47 | +uv pip install harp-python |
| 48 | +``` |
0 commit comments