-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RSDK-2062 Document build and run steps (#2)
Co-authored-by: James Otting <xepher@xepher.net>
- Loading branch information
1 parent
22b6367
commit ac46778
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -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). |