Skip to content

Commit

Permalink
RSDK-2062 Document build and run steps (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: James Otting <xepher@xepher.net>
  • Loading branch information
maximpertsov and Otterverse authored Mar 21, 2023
1 parent 22b6367 commit ac46778
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,43 @@
# wifi-sensor

A sensor that detects wifi strength

## Usage

### 1. Build binary

If you clone this repository to the target environment where you run your Viam robot, then you can build a binary named `wifi` with:

```
go build -o wifi
```

Alternatively, if you want to build a binary for a different target environment, please use the [viam canon tool](https://github.com/viamrobotics/canon).

### 2. Add to robot configuration

Copy the binary to the robot (system where viam-server is running) and add the following to your configuration:

```
...
"modules": [
...,
{
"executable_path": "<path_to_binary>",
"name": "wifisensor"
},
...,
],
"components": [
...,
{
"name": "wifi",
"type": "sensor",
"model": "viam-labs:sensor:linux-wifi"
},
...,
],
...
```

For more information on how to configure modular components, [see this example](https://docs.viam.com/services/slam/run-slam-cartographer/#step-1-add-your-rdiplar-as-a-modular-component).

0 comments on commit ac46778

Please sign in to comment.