Skip to content

Commit

Permalink
oled
Browse files Browse the repository at this point in the history
  • Loading branch information
ImplFerris committed Oct 26, 2024
1 parent f2d4deb commit 803565d
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@
- [Ultrasonic](./ultrasonic/index.md)
- [How it works?](./ultrasonic/concepts.md)
- [Light it Up](./ultrasonic/action.md)
- [OLED Display](./oled/index.md)
- [I2C](./oled/i2c.md)
- [Hello World](./oled/hello-world.md)
- [Ferris](./oled/ferris.md)

- [Resources](./resources.md)
Binary file added src/images/oled-ssd1306.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/oled/ferris.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ferris on OLED

//TODO:
3 changes: 3 additions & 0 deletions src/oled/hello-world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Hello World on OLED

//TODO:
3 changes: 3 additions & 0 deletions src/oled/i2c.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# I2C

//TODO:
22 changes: 22 additions & 0 deletions src/oled/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## OLED Display

In this section, we'll learn how to connect an OLED display module to the Raspberry Pi Pico 2.

We'll create simple projects like displaying text and an image (display Ferris 🦀 image) on the OLED. We'll use the I2C protocol to connect the OLED display to the Pico.

### 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

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

## New crates
In addition to the usual crate like `rp-hal`, we will be using these new crates necessary for the project.

- [`ssd1306`](https://github.com/rust-embedded-community/ssd1306): a driver for the SSD1306 OLED display, supporting both I2C and 4-wire SPI.
- [`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.

0 comments on commit 803565d

Please sign in to comment.