A Viam sensor implementation that reads the system's wifi information. This is an example repo to show how to:
- Make a Viam module with Go
- Build it in CI and upload to the registry
For iterative development, you can run a module locally (laptop or robot) and test it using a local instance of the RDK.
Create the binary with make wifi
.
Your config will look something like this (replace /path/to/wifi-sensor with the actual path on your system):
{
"components": [
{
"name": "whatever",
"model": "viam:sensor:linux-wifi",
"type": "sensor"
}
],
"modules": [
{
"name": "wifi",
"executable_path": "/path/to/wifi-sensor/wifi",
"type": "local"
}
]
}
Our docs for running local modules are here.
- .github/workflows: CI and deploy logic
- Makefile: instructions for building the binary and bundling it into a tarball
- *.go: the implementation
- meta.json: module configuration file
If you fork this and want to deploy to the registry, you'll need to update namespaces and CI secrets. Full fork instructions are in the Python module example.