Crates.io | sensehat |
lib.rs | sensehat |
version | 1.1.0 |
source | src |
created_at | 2017-02-23 17:36:49.041477 |
updated_at | 2018-07-21 20:51:28.712028 |
description | Interface with the Raspberry Pi Foundation's official Sense HAT sensor board. |
homepage | |
repository | https://github.com/thejpster/sensehat-rs |
max_upload_size | |
id | 8653 |
size | 50,516 |
Rust support for the Raspberry Pi Sense HAT. The Sense HAT is a sensor board for the Raspberry Pi. It features an LED matrix, a humidity and temperature sensor, a pressure and temperature sensor, a joystick and a gyroscope. See https://www.raspberrypi.org/products/sense-hat/ for details on the Sense HAT.
See https://github.com/RPi-Distro/python-sense-hat for the official Python driver. This one tries to follow the same API as the Python version.
See https://github.com/thejpster/pi-workshop-rs/ for some workshop materials which use this driver.
use sensehat::{Colour, SenseHat};
if let Ok(mut hat) = SenseHat::new() {
println!("{:?}", hat.get_pressure());
hat.text("Hi!", Colour::RED, Colour::WHITE);
}