Crates.io | i2cbus |
lib.rs | i2cbus |
version | 0.1.2 |
source | src |
created_at | 2019-04-06 14:01:12.037584 |
updated_at | 2020-05-25 16:12:12.337766 |
description | A RESTful HTTP microservice exposing I2C bus control |
homepage | https://github.com/packom/i2cbus |
repository | https://github.com/packom/i2cbus |
max_upload_size | |
id | 126154 |
size | 134,997 |
A RESTful HTTP microservice exposing I2C bus control.
git clone https://github.com/packom/i2cbus
cd i2cbus
cargo build
i2cbus uses environment variables for configuration, as it's intended to be run within a container.
To run bound to localhost:8080 with INFO level logging:
env SERVER_IP=localhost \
env SERVER_PORT=8080 \
env RUST_LOG=INFO \
cargo run
Use environment variable HTTPS (no value is necessary) to enable HTTPS support, e.g.:
env SERVER_IP=localhost \
env SERVER_PORT=8443 \
env HTTPS= \
env RUST_LOG=INFO \
cargo run
i2cbus expects to find certificate and key files at the following paths (which are not currently configurable):
/ssl/key.pem
/ssl/cert.pem
To see other options run:
cargo run -- --help
To see examples controlling the I2C bus see here.