i2c_lcd_screen

Crates.ioi2c_lcd_screen
lib.rsi2c_lcd_screen
version2.0.0
sourcesrc
created_at2024-12-29 17:49:25.070523
updated_at2025-01-29 08:55:54.71573
descriptionRewrite of I2C driver for LM1602 LCD displays based on port of LiquidCrystal_I2C.h.
homepagehttps://github.com/emeric-martineau/i2c_lcd_screen
repositoryhttps://github.com/emeric-martineau/i2c_lcd_screen
max_upload_size
id1498358
size48,254
Emeric MARTINEAU (emeric-martineau)

documentation

README

I2C LCD

Port of the liquide crystall I2C lirary found for arduino in rust.

Compatible with embedded-hal v1 and embedded-hal-bus v1.

Supports 4x16 Displays.

Tested on raspberry pi and esp32.

Example of use:

use rppal::{gpio::Gpio, i2c::I2c};

static  LCD_ADDRESS: u8 = 0x27;

fn main() {
    let mut i2c = I2c::new().unwrap();
    let mut delay = rppal::hal::Delay;

    let mut lcd = i2c_lcd::Lcd::new(&mut i2c, LCD_ADDRESS, &mut delay).unwrap();

    lcd.set_display(screen::Display::On).unwrap();
    lcd.set_backlight(screen::Backlight::On).unwrap();
    lcd.print("Hello world!").unwrap();
}

Commit count: 47

cargo fmt