From cfe1c6b11ad2b5f1e021f80f78802be4cfa2ecbb Mon Sep 17 00:00:00 2001 From: ede1998 Date: Wed, 5 Aug 2026 20:33:00 +0200 Subject: [PATCH] working mini display example --- Cargo.lock | 1 + Cargo.toml | 4 +--- src/bin/experiment_ch1115.rs | 10 +++++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed56a59..9700615 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -232,6 +232,7 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "ch1115" version = "0.1.2" +source = "git+https://github.com/ede1998/ch1115.git?rev=2d3a3ba38050efe012e6a210afe3e125ec280c37#2d3a3ba38050efe012e6a210afe3e125ec280c37" dependencies = [ "display-interface", "embedded-graphics-core", diff --git a/Cargo.toml b/Cargo.toml index 2725dce..ca491db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,9 +48,7 @@ embedded-hal-compat = "0.13.0" [patch.crates-io] -ch1115 = { path = "./ch1115" } - - +ch1115 = { git = "https://github.com/ede1998/ch1115.git", rev = "2d3a3ba38050efe012e6a210afe3e125ec280c37" } # For fine tuning these settings, please refer to https://doc.rust-lang.org/cargo/reference/profiles.html [profile.dev] diff --git a/src/bin/experiment_ch1115.rs b/src/bin/experiment_ch1115.rs index f3ed3cc..6b7d7a7 100644 --- a/src/bin/experiment_ch1115.rs +++ b/src/bin/experiment_ch1115.rs @@ -95,12 +95,12 @@ async fn main(_spawner: Spawner) { loop { log::info!("Init finished"); - // let text_style = MonoTextStyle::new(&FONT_6X10, BinaryColor::On); - // Text::new("Hello OLED", Point::new(10, 20), text_style) - // .draw(&mut display) - // .unwrap(); + let text_style = MonoTextStyle::new(&FONT_6X10, BinaryColor::On); + Text::new("Hello OLED", Point::new(10, 20), text_style) + .draw(&mut display) + .unwrap(); - // display.flush().unwrap(); + display.flush().unwrap(); Timer::after_millis(1000).await; } }