forked from moke/spaceapi-tuerpie-nix
af91ec61c9 | ||
---|---|---|
.config | ||
src | ||
.env | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
Makefile | ||
README.md | ||
shell.nix |
README.md
Spaceapi Tuerpi
Feeding our SpaceAPI with Data from our entrance door.
Setup
Please change DOOR_PIN
accordingly.
DOOR_PIN
defaults to a closed door, when HIGH.
You need to provide the environment variables
SPACEAPI_URL
and API_KEY
.
Build
Install stable version of rust and run a regular cargo build:
cargo build
Cross compile
Install arm toolchain and libmusl for static linked binaries:
apt-get install gcc-arm-linux-gnueabihf musl-dev musl-tools
Build the application for raspberry pi:
cargo build --target=armv7-unknown-linux-musleabihf