Skip to content

Commit

Permalink
Merge pull request #119 from gabevenberg/led-coordinates-doc
Browse files Browse the repository at this point in the history
added coordiante system documentation info.
  • Loading branch information
therealprof authored Oct 31, 2023
2 parents 09a5089 + 21b544e commit 66a9f3c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions microbit-common/src/display/blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@
//! }
//! ```
//!
//! The coordiante system is oriented so the 'bottom' (x,4) row is the edge with the edge
//! connector. That means that
//!
//! ```no_run
//! display.show(
//! &mut timer,
//! [
//! [0, 0, 1, 0, 0],
//! [0, 1, 1, 1, 0],
//! [1, 0, 1, 0, 1],
//! [0, 0, 1, 0, 0],
//! [0, 0, 1, 0, 0],
//! ],
//! 1000,
//!);
//! ```
//! Will display an arrow pointing towards the boards usb port.
//!
//! For a working example [`examples/display-blocking`](https://github.com/nrf-rs/microbit/tree/main/examples/display-blocking)
use crate::hal::{
gpio::{Output, Pin, PushPull},
Expand Down
2 changes: 2 additions & 0 deletions microbit-common/src/display/nonblocking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
//! (0,4) ... (4,4)
//! ```
//!
//! where the 'bottom' (x,4) of the board is the edge connector.
//!
//! ## Greyscale model
//!
//! LED brightness levels are described using a scale from 0 (off) to 9
Expand Down

0 comments on commit 66a9f3c

Please sign in to comment.