Crates.io | nanohat-oled |
lib.rs | nanohat-oled |
version | 0.2.0 |
source | src |
created_at | 2019-01-14 00:55:53.304795 |
updated_at | 2022-01-09 05:59:25.448093 |
description | Library to work with the NanoHat OLED display |
homepage | https://github.com/squidpickles/nanohat-oled |
repository | https://github.com/squidpickles/nanohat-oled.git |
max_upload_size | |
id | 108429 |
size | 20,561 |
This is a Rust port of the manufacturer code for the NanoHat OLED, based on the SSD1306 OLED display from Solomon Systech.
It enables basic access to the screen functions, including a facility for displaying text and images.
use nanohat_oled::{Oled, OledResult};
fn main() -> OledResult {
let mut oled = Oled::from_path("/dev/i2c-0")?;
oled.init()?;
oled.put_string("Hello, world!")?;
Ok(())
}