-
-
Notifications
You must be signed in to change notification settings - Fork 39
docs(esp32 std demo): Add README.md for esp32-std-demo #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
orhun
merged 8 commits into
ratatui:main
from
Vaishnav-Sabari-Girish:docs/document_setup
Mar 20, 2026
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0e16333
docs(esp32 std demo): Add README.md for esp32-std-demo
Vaishnav-Sabari-Girish 871e6c6
Merge branch 'main' of github.com:Vaishnav-Sabari-Girish/mousefood in…
Vaishnav-Sabari-Girish 86db9d5
docs(README update): The README.md has been fixed as requested
Vaishnav-Sabari-Girish c206c20
fix(cosmetic change): Add backticks to ratatui
Vaishnav-Sabari-Girish 86ae685
style: make stylistic changes
orhun e0322c6
style: run formatter
orhun e3b0b21
Merge branch 'main' into docs/document_setup
orhun 0aba932
style: run formatter
orhun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # `mousefood` Examples | ||
|
|
||
| This directory contains the examples of `mousefood`. | ||
|
|
||
| ## Examples | ||
|
|
||
| ### ESP32 Examples | ||
|
|
||
| 1. [ESP32 `std` Demo](./esp32-std-demo/README.md) | ||
| 2. [ESP32 `no_std` Demo](./esp32-no-std-demo/README.md) | ||
|
|
||
| ### Waveshare Demo | ||
|
|
||
| 1. [EPD Waveshare Demo](./epd-waveshare-demo/README.md) | ||
|
|
||
| ### Simulator | ||
|
|
||
| 1. [Simulator Demo](./simulator/README.md) |
Vaishnav-Sabari-Girish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| # ESP32 `std` Demo | ||
|
|
||
| Contains examples for `std` demo using LILYGO T-Display | ||
Vaishnav-Sabari-Girish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Pinmap | ||
|
|
||
|  | ||
|
|
||
| <br> | ||
Vaishnav-Sabari-Girish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <details> | ||
| <summary><h4>Pin Table</h4></summary> | ||
|
|
||
| ### **Left Header Pins** (Top to Bottom) | ||
|
|
||
| | Pin Label | Primary Name | Secondary Functions | | ||
| | :--- | :--- | :--- | | ||
| | **G** | GND | Ground | | ||
| | **G** | GND | Ground | | ||
| | **21** | GPIO 21 | Wire_SDA (I2C) | | ||
| | **22** | GPIO 22 | Wire_SCL (I2C) | | ||
| | **17** | GPIO 17 | | | ||
| | **2** | GPIO 2 | ADC12, TOUCH2 | | ||
| | **15** | GPIO 15 | ADC13, TOUCH3 | | ||
| | **13** | GPIO 13 | ADC14, TOUCH4 | | ||
| | **12** | GPIO 12 | ADC15, TOUCH5 | | ||
| | **G** | GND | Ground | | ||
| | **G** | GND | Ground | | ||
| | **3V** | 3V3 | Power (3.3V) | | ||
|
|
||
|
|
||
| ### **Right Header Pins** (Top to Bottom) | ||
|
|
||
| | Pin Label | Primary Name | Secondary Functions | | ||
| | :--- | :--- | :--- | | ||
| | **3V** | 3V3 | Power (3.3V) | | ||
| | **36** | GPIO 36 | SVP, ADC0 | | ||
| | **37** | GPIO 37 | | | ||
| | **38** | GPIO 38 | | | ||
| | **39** | GPIO 39 | SVN, ADC3 | | ||
| | **32** | GPIO 32 | ADC4, TOUCH9 | | ||
| | **33** | GPIO 33 | ADC5, TOUCH8 | | ||
| | **25** | GPIO 25 | ADC18, DAC1 | | ||
| | **26** | GPIO 26 | ADC19, DAC2 | | ||
| | **27** | GPIO 27 | ADC17, TOUCH7 | | ||
| | **G** | GND | Ground | | ||
| | **5V** | 5V | Power (5V) | | ||
|
|
||
Vaishnav-Sabari-Girish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### **Internal Display Pins (ST7789V)** | ||
|
|
||
| | Pin / GPIO | Function | Description | | ||
| | :--- | :--- | :--- | | ||
| | **19** | MOSI | SPI Data | | ||
| | **18** | SCLK | SPI Clock | | ||
| | **5** | CS | Chip Select | | ||
| | **16** | DC | Data/Command | | ||
| | **23** | RST | Reset | | ||
| | **4** | BL | Backlight | | ||
|
|
||
|
|
||
| ### **Onboard Buttons** | ||
|
|
||
| | Button Location | Pin / Name | | ||
| | :--- | :--- | | ||
| | **Left Button** | GPIO0 | | ||
| | **Right Button** | GPIO35 | | ||
| | **Side Button** | RST (Reset) | | ||
|
|
||
| </details> | ||
|
|
||
| ## Wiring | ||
|
|
||
| Internally the LILYGO T-Display is wired as follows | ||
|
|
||
| | Component | Pin (GPIO) | Function | Direction / Type | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **Display Backlight** | GPIO 4 | Backlight Control | Output | | ||
| | **Display SPI** | GPIO 18 | SCLK (SPI Clock) | Output | | ||
| | **Display SPI** | GPIO 19 | MOSI (SPI Data Out) | Output | | ||
| | **Display SPI** | GPIO 5 | CS (Chip Select) | Output | | ||
| | **Display SPI** | GPIO 16 | DC (Data/Command) | Output | | ||
| | **Display Reset** | GPIO 23 | Reset Pin (RST) | Output | | ||
| | **Button** | GPIO 0 | User Input (Triggers on Negative Edge) | Input (Interrupt) | | ||
| | **Battery Reader** | GPIO 34 | ADC Input (Measures Battery Voltage) | Analog Input (ADC1) | | ||
Vaishnav-Sabari-Girish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <br> | ||
|
|
||
| ## Notes | ||
|
|
||
| **Hardware Specifications:** | ||
| * **Board:** LILYGO TTGO T-Display V1.1 (ESP32-based) | ||
| * **Display:** 1.14-inch IPS LCD | ||
| * **Display Controller:** ST7789V | ||
| * **Resolution:** 135 x 240 pixels | ||
| * **Onboard Buttons:** | ||
| * Left Button: GPIO 0 (Configured for negative-edge interrupts) | ||
| * Right Button: GPIO 35 | ||
| * **Battery Monitoring:** Read via ADC1 on GPIO 34. | ||
|
|
||
| **Software & Driver Configurations:** | ||
| * **Framework:** Rust using `esp-idf-svc` (ESP-IDF bindings). | ||
| * **UI Library:** `ratatui` (running via the `mousefood` embedded backend). | ||
| * **SPI Settings:** 80 MHz baud rate, SPI Mode 3, Write-only (no MISO connection needed). | ||
| * **Display Driver (`mipidsi`):** | ||
| * **Color Inversion:** Enabled (`ColorInversion::Inverted`). | ||
| * **Hardware Offset:** Requires an X/Y offset of `(52, 40)` to render correctly on this specific panel. | ||
| * **Orientation:** Rotated 90 degrees (`Rotation::Deg90`) for a landscape view. | ||
| * **ADC Settings (Battery):** Configured for 12-bit resolution with 11dB attenuation (`DB_11`) and Line calibration to accurately read voltages up to ~3.3V. | ||
Vaishnav-Sabari-Girish marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.