Skip to content
Draft
128 changes: 77 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,94 +1,120 @@
# Deskbuddy

Deskbuddy is a compact ESP32-based smart desk companion built around a touchscreen display. The project combines 3D printing, simple hardware, and software to turn a raw ESP32 screen into a practical mini dashboard for your workspace.
Deskbuddy turns a low-cost ESP32 touchscreen into a focused desk companion for work: clock, weather icons, hourly and daily forecast, notes, checklist, timer, Wi-Fi setup, brightness, live quotes, technology headlines, daily psalm reading, and a browser-based settings panel.

## Tested Board
This fork is tuned for a clean, minimal interface on the CYD 2.8 inch display. The main goal is to make the device useful at a glance during the workday, without needing a phone or laptop tab open.

This fork has been tested on the **ESP32-2432S028R** 2.8 inch touchscreen board, also commonly sold as:
## Tested Hardware

- **CYD** / Cheap Yellow Display
- **ESP32-2432S028R ILI9341**
- 240 x 320 TFT display with XPT2046 touch
Tested and working on:

The working display configuration for this board is included in [`User_Setup.h`](User_Setup.h):
- Board: **ESP32-2432S028R CYD**
- Display: **2.8 inch ILI9341**, 240 x 320
- Touch: **XPT2046**
- Chip detected locally: **ESP32-D0WD-V3**

Known working display configuration is included in [`User_Setup.h`](User_Setup.h):

- Display driver: `ILI9341_2_DRIVER`
- Display SPI bus: `HSPI`
- TFT pins: MISO `12`, MOSI `13`, SCLK `14`, CS `15`, DC `2`
- Backlight pin: `21`
- Touch pins: CS `33`, IRQ `36`, SCK `25`, MISO `39`, MOSI `32`

If your screen stays white, make sure the included `User_Setup.h` has been copied into the installed `TFT_eSPI` library folder, replacing the library's default setup file.

## Current Features

- Touch dashboard with Home, Weather, Notes, Status, and Setup pages
- On-device Setup page for brightness, city presets, live content mode, and Wi-Fi setup portal
- Browser settings page for notes, theme, widgets, location, timers, brightness, and content mode
- Weather from Open-Meteo
If the screen stays white, replace the installed TFT_eSPI `User_Setup.h` with the one from this repo.

## Features

- Minimal touch UI with Home, Weather, Notes, Network, and Setup pages
- More usable screen space with a compact top status strip and slimmer bottom navigation
- Redesigned Home page with clock, weather, focus, note, and scrolling live ticker
- Show Mode on Home with rotating large-format slides for clock, weather, focus, checklist, live briefing, and daily psalm
- Apple-inspired Weather page with current conditions, drawn weather icons, hourly forecast, and 7-day forecast
- Focus timer with configurable presets and completion alert
- Notes card for quick daily reminders
- Touch checklist with editable labels and on-device checkboxes
- Live ticker/card with quotes, technology headlines, or mixed rotation with local fallback
- Daily local Bible reflection with psalm/verse reference and short prompt, available without internet
- On-device Setup page for brightness, city presets, live content mode, and Wi-Fi portal
- Standalone Network console with Wi-Fi scan, RSSI, BSSID, channel/security, channel congestion map, IP, gateway, DNS, common gateway service checks, MAC, subnet, and uptime
- Local browser settings page after the board joins Wi-Fi
- Open-Meteo weather, hourly forecast, daily forecast, wind, UV, and rain probability
- Sunrise and sunset from sunrise-sunset.org
- KP index from NOAA
- Optional quote card from Quotable
- Optional technology headline from Hacker News Algolia
- GitHub Actions firmware build
- GitHub Pages Web Serial installer
- GitHub Pages installer using ESP Web Tools

## Wi-Fi Credentials
Deskbuddy intentionally keeps network tools defensive: it can inspect nearby 2.4 GHz Wi-Fi networks and the network it is connected to, but it does not include deauth, handshake capture, packet sniffing, or password attack features.

Do not hardcode Wi-Fi credentials in the sketch.
## Install From Browser

Copy the example secrets file and edit it locally:
After the workflow publishes from `main`, open:

```sh
cp arduino_secrets.example.h arduino_secrets.h
```

Then set:

```cpp
#define DESKBUDDY_WIFI_SSID "YOUR_WIFI_SSID"
#define DESKBUDDY_WIFI_PASS "YOUR_WIFI_PASSWORD"
```text
https://fernandofatech.github.io/Deskbuddy/
```

`arduino_secrets.h` is ignored by Git so your network name and password are not committed.
Use Chrome or Edge, connect the board by USB, and click **Install Deskbuddy**.

## Arduino Setup
## Arduino Build

Use the Arduino ESP32 board package and select:

- Board: `ESP32-2432S028R CYD`
- Partition scheme: `Huge APP (3MB No OTA/1MB SPIFFS)`
- Upload speed: `115200` if higher speeds fail

Install these Arduino libraries:
Install the Arduino ESP32 core and these libraries:

- `TFT_eSPI`
- `ArduinoJson`
- `XPT2046_Touchscreen`
- `WiFiManager`

Before compiling, replace the installed TFT_eSPI setup file with this repo's `User_Setup.h`.
Use this board profile:

```text
esp32:esp32:jczn_2432s028r
```

Recommended options:

- Partition scheme: `Huge APP (3MB No OTA/1MB SPIFFS)`
- Upload speed: `115200`

On macOS with `arduino-cli`, the TFT_eSPI setup file is usually:
Example compile:

```sh
~/Documents/Arduino/libraries/TFT_eSPI/User_Setup.h
arduino-cli compile --fqbn esp32:esp32:jczn_2432s028r:UploadSpeed=115200,PartitionScheme=huge_app Deskbuddy
```

## Notes
Example upload:

The firmware exposes a local web interface after the ESP32 connects to Wi-Fi. Use the serial monitor at `115200` baud to inspect boot logs and find the device IP address.
```sh
arduino-cli compile --upload -p /dev/cu.usbserial-120 --fqbn esp32:esp32:jczn_2432s028r:UploadSpeed=115200,PartitionScheme=huge_app Deskbuddy
```

If Wi-Fi is not configured, open the on-device `Setup` page and tap the Wi-Fi card. Deskbuddy starts a temporary access point named `Deskbuddy Setup`; connect from a phone or computer and choose the desired Wi-Fi network.
## Wi-Fi And Secrets

## GitHub Pages Installer
Do not commit Wi-Fi credentials.

The workflow in `.github/workflows/build-and-pages.yml` compiles the firmware and publishes a Web Serial installer from the `web/` folder when changes land on `main`.
Optional static credentials can be stored locally:

The installer expects a generated merged firmware binary at:
```sh
cp arduino_secrets.example.h arduino_secrets.h
```

```text
firmware/deskbuddy-esp32-2432s028r-cyd.bin
Then edit:

```cpp
#define DESKBUDDY_WIFI_SSID "YOUR_WIFI_SSID"
#define DESKBUDDY_WIFI_PASS "YOUR_WIFI_PASSWORD"
```

GitHub Actions creates that file from the Arduino CLI build output.
`arduino_secrets.h` is ignored by Git. If credentials are not present, use the board's Setup page to open the `Deskbuddy Setup` Wi-Fi portal.

Optional AI/API keys must also stay in `arduino_secrets.h`; never commit real keys.

## Documentation

- [Setup Guide](SETUP_GUIDE.md)
- [User Guide](docs/USER_GUIDE.md)
- [Development Guide](docs/DEVELOPMENT.md)

## CI And Pages

The workflow at [`.github/workflows/build-and-pages.yml`](.github/workflows/build-and-pages.yml) compiles the firmware, uploads build artifacts, and deploys the browser installer from `web/` when changes land on `main`.
Loading
Loading