
A simple program to test embedded graphics with esp32s3-box using embedded graphics simulator (https://docs.rs/embedded-graphics-simulator/0.1.0/embedded_graphics_simulator/).
Thanks to @georgik (https://www.github.com/georgik) for creating a PR on my examples repository and suggesting this approach.
Can't be used to test animations, only drawn examples outside of loop{}
Let's demostrate usage on my lollipop guy example 📜 🎨
Firstly, paste your crates between the comments above the main() in main.rs (you also have to include used crates in Cargo.toml):
//paste your crates here (only those unrelated to chip initialisation and those that are not here already):
use examples_assets::{body_part, hand};
// end of crates
💡 Relocate your drawing functionality to a separate crate for easier import as shown above
Next, past your functional code between another set of comments located above loop{}:
//paste all the code after initialisation here (usually everything after you initialize the display):
body_part(&mut display, "'", [40.0, 50.0, 220.0, 200.0], 6400, -1, 1);
body_part(&mut display, "'", [60.0, 50.0, 220.0, 60.0], 6400, 1, -1);
body_part(&mut display, "'", [20.0, 15.0, 200.0, 60.0], 1300, -1, -1);
body_part(&mut display, "'", [20.0, 15.0, 240.0, 60.0], 1300, -1, -1);
hand(&mut display, 125, 175);
body_part(&mut display, "'", [30.0, 30.0, 110.0, 110.0], 3300, -1, -1);
// end of source code
Then, simply run:
cargo run --release
and this should be the output you get after the program compiles: