Skip to content

Commit

Permalink
added datasheet link for ssd1306
Browse files Browse the repository at this point in the history
  • Loading branch information
ImplFerris committed Dec 18, 2024
1 parent afb7fa4 commit ab07a6d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/oled/hello-oled.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ display.init().unwrap();

### Set Text Style and Draw
Next, we define the text style and use it to display "Hello Rust" on the screen:

```rust
// Embedded graphics
let text_style = MonoTextStyleBuilder::new()
Expand All @@ -90,7 +91,9 @@ Text::with_baseline("Hello, Rust!", Point::new(0, 16), text_style, Baseline::Top
.draw(&mut display)
.unwrap();
```
Here, we are writing the message at coordinates (x=0, y=16).


### Write out data to a display
```rust
display.flush().unwrap();
Expand Down
6 changes: 6 additions & 0 deletions src/oled/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ We'll create simple projects like displaying text and an image (display Ferris

<img style="display: block; margin: auto;width:500px" alt="pico2" src="../images/oled-ssd1306.jpg"/>

<!-- TODO: more info on the intro and in-depth technical info for the OLED -->

### Hardware Requirements

For this project, you'll need:
- An OLED display (0.96 Inch I2C/IIC 4-Pin, 128x64 resolution, SSD1306 chip)
- A breadboard
- Jumper wires


## Setup

<table>
Expand Down Expand Up @@ -80,3 +83,6 @@ In addition to the usual crate like `rp-hal`, we will be using these new crates
- [`embedded-graphics`](https://github.com/embedded-graphics/embedded-graphics): a 2D graphics library tailored for memory-constrained embedded devices, enabling text and graphic rendering.
- [`tinybmp`](https://github.com/embedded-graphics/tinybmp): a lightweight BMP parser for embedded, no-std environments. We'll use this to directly load `.bmp` images with the `embedded-graphics` crate, avoiding the need for raw image data.

## Resources

- [SSD1306 Datasheet](https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf)

0 comments on commit ab07a6d

Please sign in to comment.