https://github.com/dclause/hermes-five
The Rust Robotics & IoT Platform.
https://github.com/dclause/hermes-five
arduino iot rust
Last synced: 5 months ago
JSON representation
The Rust Robotics & IoT Platform.
- Host: GitHub
- URL: https://github.com/dclause/hermes-five
- Owner: dclause
- License: mit
- Created: 2024-07-05T06:49:01.000Z (over 1 year ago)
- Default Branch: develop
- Last Pushed: 2025-07-17T00:52:39.000Z (5 months ago)
- Last Synced: 2025-07-24T07:00:03.959Z (5 months ago)
- Topics: arduino, iot, rust
- Language: Rust
- Homepage: https://dclause.github.io/hermes-five/
- Size: 1.91 MB
- Stars: 36
- Watchers: 1
- Forks: 1
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Roadmap: roadmap.md
Awesome Lists containing this project
README
# Hermes-Five
[](/LICENSE)
[](https://github.com/dclause/hermes-five/actions/workflows/build.yml?query=branch%3Adevelop)
[](https://github.com/dclause/hermes-five/actions/workflows/test.yml?query=branch%3Adevelop)
[](https://docs.rs/hermes-five)
[](https://codecov.io/gh/dclause/hermes-five/branch/develop)
[](https://crates.io/crates/hermes-five)
[](https://dclause.github.io/hermes-five/)
### The Rust Robotics & IoT Framework
**Drive and orchestrate Arduinos, ESPs, nodeMCU, RaspberryPis and all kind
of [Firmata-compatible](https://github.com/firmata) hardware in pure async Rust.
Control LEDs, sensors, motors from your laptop with the safety and speed of Rust.**
_Program robots and embedded devices with confidence. Hermes-Five gives you high-level APIs to remotely control boards (
Arduino, ESP, nodeMCU, RaspberryPI, ..), extenders (PCA9685, PCF8575, ..) LEDs, sensors, servos and more, all from safe
and asynchronous Rust code. Think _Johnny-Five_, but safer, faster, and fully async._

## Documentation
Hermes-Five offers three main documentation sources:
- The [user documentation](https://dclause.github.io/hermes-five) for tutorials and concepts.
- The [API documentation](https://docs.rs/hermes-five/latest) for developer reference.
- The [examples](https://github.com/dclause/hermes-five/tree/develop/hermes-five/examples) directory to learn by doing.
## Key Features
* **๐ง High-level abstractions:** Control LEDs, sensors, buttons, servos and all kind of devices. Write expressive, async
Rust code to control them.
* **๐ Protocol-agnostic:** Serial, WiFi and Bluetooth supported (via Firmata).
* **๐งฉ Modular design:** Plug-and-play support for boards and devices. Arduino, ESP32, nodeMCU, Raspberry Pi, etc.
* **๐น๏ธ Animation engine:** Interpolate servo movements, LED fades and more with ease.
* **๐งช Test-friendly:** Includes mocks to run and test logic without hardware.
_๐ฑ๏ธ Prefer a GUI over code? Try [Hermes-Studio](https://github.com/dclause/hermes-studio) - a visual programming
interface powered by Hermes-Five._
## Getting started
- Flash the
compatible [Firmata Protocol client](https://github.com/firmata/arduino/blob/main/examples/StandardFirmataPlus/StandardFirmataPlus.ino)
via Arduino IDE on your board.
- Create a new Rust project:
```shell
cargo new my_awesome_project
cd my_awesome_project
```
- Add this crate to your dependencies in the `Cargo.toml` file.
```toml
[dependencies]
hermes-five = "0.1.0"
```
- Modify your `src/main.rs` as needed (
see [examples](https://github.com/dclause/hermes-five/tree/develop/hermes-five/examples) for inspiration).
- Start by exploring the [examples](https://github.com/dclause/hermes-five/tree/develop/hermes-five/examples) code,
the [user documentation](https://dclause.github.io/hermes-five)
- or the [API documentation](https://docs.rs/hermes-five/latest)
> [!TIP]
> Feature flags:
> - **libudev** -- (enabled by default) Activates `serialport` crate _libudev_ feature under-the-hood (required on
Linux only for port listing).
> - **serde** -- Enables serialize/deserialize capabilities for most entities.
> - **mock** -- Provides mocked entities of all kinds (useful for tests mostly).
### Hello Hermes!
The following example shows the simplest possible program: from your computer, command a serially connected Arduino to
blink its built-in LED on pin 13.
```rust
use hermes_five::hardware::{Board, BoardEvent};
use hermes_five::devices::Led;
#[hermes_five::runtime]
async fn main() {
// Register a new board
// (of type arduino + auto-detected serial port by default)
let board = Board::start().unwrap();
// When board communication is ready:
board.on(BoardEvent::OnReady, |board: Board| async move {
// Register a LED on pin 13 (arduino embedded led).
// Pin: 13; OFF by default
let mut led = Led::new(&board, 13, false)?;
// Blinks the LED every 500ms: indefinitely.
led.blink(500);
Ok(())
});
}
```
## Examples
All available examples can be found in
the [examples](https://github.com/dclause/hermes-five/tree/develop/hermes-five/examples) folder.
To start an example, run the following command:
```
cargo run --example folder_examplename
```
To run an example in a file called `examples/folder/examplename.rs`, use the concatenation name
as `folder_examplename`.
If you want the "full" log output you can use:
```
RUST_LOG=DEBUG cargo run --example folder_examplename
```
## Roadmap
For details, see the full [roadmap](/roadmap.md): currently working
toward release 0.2
## Contribution
All contributions are more than welcome through [PR](https://github.com/dclause/hermes-five/pulls) and
the [issue queue](https://github.com/dclause/hermes-five/issues).
- Fork the repository
- Create a new branch: `git checkout -b feature-branch`
- Commit your changes: `git commit -am 'Add new feature'`
- Push to the branch: `git push origin feature-branch`
- Create a new Pull Request
**_The author does not claim to know everything about Rust programming or IoT, and all ideas are welcome as long as they
respect the project's original philosophy._**
## License
This project is licensed under the MIT License. See
the [LICENSE](/LICENSE) file for details.
## Contact
For support, please open an issue or reach out to the [author](https://github.com/dclause).