LCD1602RGB Driver

Driver for the LCD1602RGB segmented LCD, it is not intended for use with other segmented LCDs, however you may be able to use this driver for some basic functionality.

I wrote this driver for my own personal use and will maintain it and implement missing instructions when I need them, especially concerning an application I plan to work on. However feel free to submit a pull request.

This my first real embedded Rust project, and I used the following resources:

Usage:

Raspberry Pi Pico

Follow the instructions here: https://github.com/rp-rs/rp2040-project-template

Include latest version in Cargo.toml: toml [dependencies] lcd1602rgb-rs = "0.1.0"

Use this example code in the main.rs of the rp2040 project template.

```Rust let mut sclpin = pins.gpio15.intomode::(); let mut sdapin = pins.gpio14.intomode::(); let i2cdev = i2c::I2C::newcontroller(pac.I2C1, sdapin, sclpin, 400u32.kHz(), &mut pac.RESETS, clocks.systemclock.freq()); let mut displaycontroller = Display::new(i2cdev, delay).unwrap(); displaycontroller.writetext("Hello, World! How are you?").unwrap(); let mut r: u8 = 0; let mut g: u8 = 255; let mut b: u8 = 128; let mut rset = true; let mut gset = true; let mut b_set = true;

loop { if r == 255 { rset = false; } else if r == 0 { rset = true; } if rset { r += 1; } else { r -= 1; } if g == 255 { gset = false; } else if g == 0 { gset = true; } if gset { g += 1; } else { g -= 1; } if b == 255 { bset = false; } else if b == 0 { bset = true; } if bset { b += 1; } else { b -= 1; } displaycontroller.delay.delayms(10); displaycontroller.backlight_colour(r, g, b).unwrap(); } ```

To Do: