Crates.io | hd44780-ntb |
lib.rs | hd44780-ntb |
version | 0.0.6 |
source | src |
created_at | 2020-07-28 02:06:07.073108 |
updated_at | 2020-10-07 17:19:49.960476 |
description | A non-text buffer embedded hal driver for hd44780 like LCD display controllers |
homepage | https://github.com/Dragonrun1/hd44780_ntb |
repository | https://github.com/Dragonrun1/hd44780_ntb |
max_upload_size | |
id | 270290 |
size | 9,130,974 |
This is an implementation of a hardware driver for a HD44780 type LCD controller write in Rust which uses the linux-embedded-hal library. It exposes a simple trait-based API for the command set which minimizes the coupling between the hardware driver (GPIO, I2C, etc) and the code that passes commands and data to the display.
You will need to have a recent version of Rust installed. Any version of Rust that supports version 0.2 or later of the linux-embedded-hal should work but versions from 1.39 to 1.45 of Rust have been used during initial development on both the nightly and release channels. Earlier versions might work as well but have not been tested.
Development can be done on an OS (GPIO, I2C, etc) that Rust supports but the expected target would typically be something like a Raspberry Pi, STM32, or another embeddable system which can run Linux. All initial development has been done with a combination of a laptop running Windows 10 and a 4GB Raspberry Pi 4 running the Raspberry Pi OS (Raspbian).
To use the crate in your own project all you need to do is include it in
[dependencies]
of you project like you would any other crate.
If you have cargo-edit install then on the command line you can use:
cargo add hd44780-ntb
Which should add something like this in your Cargo.toml:
[dependencies]
hd44780-ntb = "0.0.5"
You will find examples in the examples
directory. The Raspberry Pi GPIO
examples were used for testing during initial development on a RPi 4.
Here's a short clip from a run of the rpi4bit example:
To build this example start by clone this project somewhere on your Raspberry Pi:
git clone https://github.com/Dragonrun1/hd44780_ntb
Next execute the follow to build the example:
cargo build --example rpi4bit
And finally execute:
sudo ./target/debug/examples/rpi4bit
You should see the series of messages displayed in the terminal and on your LCD if it has been hooked up using the same GPIO pins that the example expects.
Contributors are welcome. I would like to see the hardware drives extended beyond just the Raspberry Pi but I currently don't have access to other hardware for development or testing. Make sure you have read the Contributor Covenant Code of Conduct. All contributed code will be considered to also be contributed under a MIT license. Please include your information in a comment on all code files for the copyright etc.
All contributed documentation or non-code text like this README etc. will be consider to be under the same CC-BY-SA license.
All code is available under the MIT license. You can find a copy of the license in the LICENSE file.
All documentation like this README is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC-BY-SA).