Skip to content

Commit

Permalink
DOCS-1154: Fix remote data capture config (#2048)
Browse files Browse the repository at this point in the history
  • Loading branch information
JessamyT authored Oct 17, 2023
1 parent ee40a83 commit 0876e68
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ description: "Set up the Espressif ESP32 for development with the micro-RDK."
Follow these steps to install and build the micro-rdk on your ESP32 for development:

1. Install the [required software](#software-requirements)
2. [Set up your development enviroment](#set-up-your-development-enviroment) manually or with Viam's Canon CLI utility _(recommended)_
2. [Set up your development environment](#set-up-your-development-environment) manually or with Viam's Canon CLI utility _(recommended)_
3. [Install the Micro-RDK](#install-the-micro-rdk)

{{% readfile "/static/include/micro-rdk-hardware.md" %}}
Expand Down Expand Up @@ -81,7 +81,7 @@ Run the following command to install `espflash`
cargo install espflash
```

### Set up your development enviroment
### Set up your development environment

{{< tabs >}}
{{% tab name="Canon CLI (recommended)" %}}
Expand Down
2 changes: 1 addition & 1 deletion docs/modular-resources/create/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ viam-sdk

See the [pip `requirements.txt` file documentation](https://pip.pypa.io/en/stable/reference/requirements-file-format/) for more information.

The following template sets up a new virtual enviroment (`venv`), installs the dependencies listed in `requirements.txt`, and runs the module entry point file `main.py`:
The following template sets up a new virtual environment (`venv`), installs the dependencies listed in `requirements.txt`, and runs the module entry point file `main.py`:

```sh { class="command-line" data-prompt="$"}
#!/bin/sh
Expand Down
53 changes: 32 additions & 21 deletions docs/services/data/configure-data-capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ If you want to remove a capture method from the configuration, click the `delete

## Configure Data Capture for Remote Parts

Viam supports data capture from remote parts.
For example, if you use a component that does not have a Linux operating system or that does not have enough storage or processing power, you can still process and capture the data from the component by adding it as a remote part.
Viam supports data capture from {{< glossary_tooltip term_id="resource" text="resources" >}} on {{< glossary_tooltip term_id="remote" text="remote" >}} parts.
For example, if you use a {{< glossary_tooltip term_id="part" text="part" >}} that does not have a Linux operating system or that does not have enough storage or processing power, you can still process and capture the data from that part's components by adding it as a remote part.

Currently, you can only configure data capture from remote components by adding them to your JSON configuration.
Currently, you can only configure data capture from remote components in your raw JSON configuration.
To add them to your JSON configuration you must explicitly add the remote component's `type`, `model`, `name`, and `additional_params` to the `data_manager` service configuration in the `remotes` configuration:

<!-- prettier-ignore -->
Expand All @@ -171,25 +171,34 @@ To add them to your JSON configuration you must explicitly add the remote compon
| `name` | The name specifies the fully qualified name of the part. |
| `additional_params` | The additional parameters specify the data sources when you are using a board. |

{{%expand "Click to view the JSON configuration for an ESP32 board" %}}
{{%expand "Click to view example JSON configuration for an ESP32 board" %}}

The following example shows the configuration of the remote part, in this case an [ESP32 board](/installation/prepare/microcontrollers/#configure-an-esp32-board).
This config is just like that of a non-remote part; the remote connection is established by the main part (in the next expandable example).

```json {class="line-numbers linkable-line-numbers"}
{
"type": {
"Type": {
"type": "component",
"namespace": "rdk"
},
"subtype": "board"
},
"model": {
"name": "rdk:esp32:board"
},
"name": "rdk:component:board/board",
"additional_params": {
"A2": "",
"A1": ""
}
"components": [
{
"name": "my-esp32",
"model": "esp32",
"type": "board",
"attributes": {
"pins": [27],
"analogs": [
{
"pin": "34",
"name": "A1"
},
{
"pin": "35",
"name": "A2"
}
]
},
"depends_on": []
}
]
}
```

Expand All @@ -203,6 +212,8 @@ The following example captures data from two analog readers that provide a volta
{
"services": [
{
"name": "data_manager",
"type": "data_manager",
"attributes": {
"capture_dir": "",
"sync_disabled": true,
Expand All @@ -227,7 +238,7 @@ The following example captures data from two analog readers that provide a volta
{
"method": "Analogs",
"capture_frequency_hz": 1,
"name": "rdk:component:board/board",
"name": "rdk:component:board/my-esp32",
"additional_params": {
"A2": "",
"A1": ""
Expand All @@ -238,7 +249,7 @@ The following example captures data from two analog readers that provide a volta
{
"method": "Gpio",
"capture_frequency_hz": 1,
"name": "rdk:component:board/board",
"name": "rdk:component:board/my-esp32",
"additional_params": {
"27": ""
},
Expand Down

0 comments on commit 0876e68

Please sign in to comment.