Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Mousefood Examples

This directory contains the examples of `mousefood`.

## ESP32 Examples

- [ESP32 `std` Demo](./esp32-std-demo/README.md)
- [ESP32 `no_std` Demo](./esp32-no-std-demo/README.md)

## Waveshare Demo

- [EPD Waveshare Demo](./epd-waveshare-demo/README.md)

## Simulator

- [Simulator Demo](./simulator/README.md)
37 changes: 37 additions & 0 deletions examples/esp32-std-demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ESP32 `std` Demo

Contains examples for `std` demo using [LILYGO T-Display](https://lilygo.cc/products/t-display).

This demo showcases various UI widgets (like `Chart`, `Gauge`, and `Tabs`) while reading physical
button presses and monitoring the board's battery voltage.

## Pinmap

![pinout](./assets/pin_diagram.jpg)

### Essential Pins

| Component | Pin (GPIO) | Description |
| :----------- | :--------- | :--------------------- |
| Display MOSI | 19 | SPI Data Out |
| Display SCLK | 18 | SPI Clock |
| Display CS | 5 | Chip Select |
| Display DC | 16 | Data/Command |
| Display RST | 23 | Reset Pin |
| Display BL | 4 | Backlight Control |
| Left Button | 0 | User Input |
| Battery ADC | 34 | Battery Voltage Reader |

## Notes

If you're adapting this demo for a different board or screen, there are some points to keep in mind:

- **Screen Configuration:** The driver (`ST7789`), screen size
(`135x240`), and hardware offset (`52, 40`) are specific to the
T-Display panel. You will need to adjust these values in the code to
match your specific display.
- **Battery Voltage Reader:** The T-Display PCB uses a voltage divider
that halves the battery voltage before it reaches the ADC on GPIO 34.
This is why the ADC reading is multiplied by 2 in the code. If you are
building a custom circuit, you will need to replicate this voltage
divider setup to safely measure battery levels.
Binary file added examples/esp32-std-demo/assets/pin_diagram.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading