About The Project
This library is a Rust implementation of ESParklines library which is extemely useful for creating real-time graphs for use with small embedded systems screeens.
This library is designed to be as simple as possible. It is responsible for:
- holding a buffer of pre-defined size of numeric data type
- renders sparklines using a passed-in function to draw lines
- is display-driver independent as you can provide any drawing function
- works with embedded-graphics simulator so you can quickly iterate on you dev machine
Built With
Getting Started
Make sure you have your rust
environment configurated
Installation
-
Add library to your
Cargo.toml
... [] = "0.1.0"
-
Use the library in you code
let mut display: = new; let bbox = new; let draw_fn = ; // create sparkline object let mut sparkline = new; let output_settings = new .theme .build; let mut window = new; loop
-
Experiment and have fun! :relieved: See
main.rs
if you want to run a quick demo.
Quickstart
- Make sure you've got
cargo
set up - Install cargo binary crate to be able to test easily on your computer
- Run the provided binary example with simulator display
- You should see an output similar to the followig one
Roadmap
- add tests
- add rustdocs
- CI integration with GithHub Actions
- better error generation & handling
See the open issues for a full list of proposed features (and known issues).
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Bernard Kobos - @bkobos - bkobos@gmail.com
Project Link: https://github.com/bernii/embedded-graphics-sparklines
Acknowledgments
- ESParklines project which this is based on