Skip to content

Commit 874c59a

Browse files
docs(esp32-std-demo): add setup information (#171)
* docs(esp32 std demo): Add README.md for esp32-std-demo The documentation for the ESP32 `std` demo has been added. Signed-off-by: Vaishnav Sabari Girish <vaishnav.sabari.girish@gmail.com> * docs(README update): The README.md has been fixed as requested This commit adds the improvements as requested. Signed-off-by: Vaishnav Sabari Girish <vaishnav.sabari.girish@gmail.com> * fix(cosmetic change): Add backticks to ratatui * style: make stylistic changes * style: run formatter * style: run formatter --------- Signed-off-by: Vaishnav Sabari Girish <vaishnav.sabari.girish@gmail.com> Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
1 parent 3a3904b commit 874c59a

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

examples/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Mousefood Examples
2+
3+
This directory contains the examples of `mousefood`.
4+
5+
## ESP32 Examples
6+
7+
- [ESP32 `std` Demo](./esp32-std-demo/README.md)
8+
- [ESP32 `no_std` Demo](./esp32-no-std-demo/README.md)
9+
10+
## Waveshare Demo
11+
12+
- [EPD Waveshare Demo](./epd-waveshare-demo/README.md)
13+
14+
## Simulator
15+
16+
- [Simulator Demo](./simulator/README.md)

examples/esp32-std-demo/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# ESP32 `std` Demo
2+
3+
Contains examples for `std` demo using [LILYGO T-Display](https://lilygo.cc/products/t-display).
4+
5+
This demo showcases various UI widgets (like `Chart`, `Gauge`, and `Tabs`) while reading physical
6+
button presses and monitoring the board's battery voltage.
7+
8+
## Pinmap
9+
10+
![pinout](./assets/pin_diagram.jpg)
11+
12+
### Essential Pins
13+
14+
| Component | Pin (GPIO) | Description |
15+
| :----------- | :--------- | :--------------------- |
16+
| Display MOSI | 19 | SPI Data Out |
17+
| Display SCLK | 18 | SPI Clock |
18+
| Display CS | 5 | Chip Select |
19+
| Display DC | 16 | Data/Command |
20+
| Display RST | 23 | Reset Pin |
21+
| Display BL | 4 | Backlight Control |
22+
| Left Button | 0 | User Input |
23+
| Battery ADC | 34 | Battery Voltage Reader |
24+
25+
## Notes
26+
27+
If you're adapting this demo for a different board or screen, there are some points to keep in mind:
28+
29+
- **Screen Configuration:** The driver (`ST7789`), screen size
30+
(`135x240`), and hardware offset (`52, 40`) are specific to the
31+
T-Display panel. You will need to adjust these values in the code to
32+
match your specific display.
33+
- **Battery Voltage Reader:** The T-Display PCB uses a voltage divider
34+
that halves the battery voltage before it reaches the ADC on GPIO 34.
35+
This is why the ADC reading is multiplied by 2 in the code. If you are
36+
building a custom circuit, you will need to replicate this voltage
37+
divider setup to safely measure battery levels.
64.6 KB
Loading

0 commit comments

Comments
 (0)