Previous
Update and manage modules
If no existing modules support your hardware or software, you can create your own. To create a new module compatible with the Micro-RDK, follow these steps.
Generate a new module skeleton from this template:
cargo generate --git https://github.com/viamrobotics/micro-rdk.git
Select templates/module
when prompted, give the module a name of your choice, and answer any additional prompts.
The CLI automatically initializes a git repository in the generated module directory.
Navigate into the generated module directory:
cd <path-to/your-module-directory>
Develop the module by defining structs which implement the necessary traits and adding tests and registration hooks for them. The traits you need to implement are determined by the API you chose to implement.
For example, to implement the sensor API, you need to implement Readings
, SensorT<f64>
and Status
traits.
For more examples, see the example module implementation walkthrough.
For further details on Micro-RDK development, including credentials management and developer productivity suggestions, please see the development technical notes page on GitHub.
To use your module in a project:
dependencies
section of the project’s Cargo.toml
file.To update your firmware with a new version of your module without a physical connection to the ESP32 microcontroller, see Over-the-air firmware updates.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!