Reading commands works
This commit is contained in:
parent
a7ae3731a4
commit
a7b8f1ca67
4 changed files with 108 additions and 62 deletions
|
|
@ -6,16 +6,17 @@ use embassy_stm32::time::Hertz;
|
|||
use embassy_time::{Duration, Timer};
|
||||
|
||||
use embedded_graphics::{
|
||||
mono_font::MonoTextStyle,
|
||||
mono_font::{
|
||||
MonoTextStyle,
|
||||
{ascii::FONT_5X7, ascii::FONT_7X13},
|
||||
},
|
||||
pixelcolor::BinaryColor,
|
||||
prelude::*,
|
||||
primitives::{PrimitiveStyleBuilder, Rectangle},
|
||||
text::Text,
|
||||
};
|
||||
use profont::{PROFONT_12_POINT, PROFONT_7_POINT};
|
||||
use ssd1306::{prelude::*, I2CDisplayInterface, Ssd1306};
|
||||
|
||||
use arrayvec::ArrayString;
|
||||
use ssd1306::{prelude::*, I2CDisplayInterface, Ssd1306};
|
||||
|
||||
#[embassy_executor::task]
|
||||
pub async fn display_task(i2c1: peripherals::I2C1, sda: peripherals::PB6, scl: peripherals::PB7) {
|
||||
|
|
@ -27,9 +28,9 @@ pub async fn display_task(i2c1: peripherals::I2C1, sda: peripherals::PB6, scl: p
|
|||
.into_buffered_graphics_mode();
|
||||
display.init().unwrap();
|
||||
|
||||
let text_large = MonoTextStyle::new(&PROFONT_12_POINT, BinaryColor::On);
|
||||
let text_large_inv = MonoTextStyle::new(&PROFONT_12_POINT, BinaryColor::Off);
|
||||
let text_small = MonoTextStyle::new(&PROFONT_7_POINT, BinaryColor::On);
|
||||
let text_large = MonoTextStyle::new(&FONT_7X13, BinaryColor::On);
|
||||
let text_large_inv = MonoTextStyle::new(&FONT_7X13, BinaryColor::Off);
|
||||
let text_small = MonoTextStyle::new(&FONT_5X7, BinaryColor::On);
|
||||
|
||||
let style_filled = PrimitiveStyleBuilder::new()
|
||||
.fill_color(BinaryColor::On)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue