i2cbus

Crates.ioi2cbus
lib.rsi2cbus
version0.1.2
sourcesrc
created_at2019-04-06 14:01:12.037584
updated_at2020-05-25 16:12:12.337766
descriptionA RESTful HTTP microservice exposing I2C bus control
homepagehttps://github.com/packom/i2cbus
repositoryhttps://github.com/packom/i2cbus
max_upload_size
id126154
size134,997
(packom)

documentation

https://github.com/packom/i2cbus

README

i2cbus

A RESTful HTTP microservice exposing I2C bus control.

Building

git clone https://github.com/packom/i2cbus
cd i2cbus
cargo build

Running

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

Controlling the I2C bus

To see examples controlling the I2C bus see here.

Commit count: 17

cargo fmt