Files
2026-07-11 23:21:21 -04:00

31 lines
1.0 KiB
Markdown

# googly
Standalone desk-pet face for Arduino Mega 2560 + 3.5" UNO-form 8-bit ILI9486
touch shield (MCUFRIEND). See IDEA.md for the concept, DECISIONS.md for
settled choices.
## Build / flash
```bash
arduino-cli compile -b arduino:avr:mega googly
arduino-cli upload -b arduino:avr:mega -p /dev/ttyACM0 googly
```
Libraries: MCUFRIEND_kbv, Adafruit GFX, Adafruit TouchScreen (all in
`~/Arduino/libraries`). No SD, no soft-SPI needed here.
## Hardware notes
- Display ID 0x9486, 480x320 in rotation 1 (landscape).
- Touch is resistive, shares LCD pins (XP=6, XM=A2, YP=A1, YM=7). After every
`ts.getPoint()` the code restores A1/A2 to OUTPUT — do not remove that.
- Touch is used pressure-only (tap/hold), never calibrated x/y.
- Full-screen redraws are too slow for animation; only eye/mouth/blush regions
are redrawn. Keep it that way.
- Serial 115200 prints state transitions and mood for debugging.
## Tuning
All behavior knobs (timings, mood rates, touch pressure window) are constants
at the top of `googly/googly.ino`.