Tiny Nerves demo that drives 320×480 SPI LCDs (ILI9486 / ST7796S) and optional touch (XPT2046 / GT911) on Raspberry Pi–class targets. The app shows build info, time, basic network status, and a demo image/text buffer.
# Pick your hardware target
export MIX_TARGET=rpi3 # or rpi4, etc.
# Pick your display variant (see table below)
export LCD_TYPE=c # a | b | c | f | g (defaults to a)
# Optional Wi-Fi
export NERVES_WIFI_SSID="your-ssid"
export NERVES_WIFI_PASSPHRASE="your-psk"
# Dependencies & firmware
mix deps.get
mix firmware
# Flash or upload
mix burn # SD card
./upload nerves.local # OTA via ssh/mdns- The firmware advertises via mDNS as
nerves.local(plus the serial-based hostname). - If you see “Image Nothing…”, place a 320×480 RGB565 file at
priv/piyopiyoex_320x480.rgb565.
Set LCD_TYPE to select panel + touch wiring/modules:
| LCD_TYPE | Panel | LCD controller | Touch controller | Panel type |
|---|---|---|---|---|
a |
Waveshare 3.5" RPi LCD (A) | ILI9486 | XPT2046 | TFT |
b |
Waveshare 3.5" RPi LCD (B) | ILI9486 | XPT2046 | IPS |
c |
Waveshare 3.5" RPi LCD (C) | ILI9486 | XPT2046 | TFT |
f |
Waveshare 3.5" RPi LCD (F) | ST7796S | GT911 | IPS |
g |
Waveshare 3.5" RPi LCD (G) | ST7796S | XPT2046 | IPS |
- MHS 3.5" is compatible with
c-type wiring.
From the code defaults:
LCD ili9486(for A/B/C)(SPI over spidev0.0):
- SPI:
spidev0.0 DC: GPIO 24RST: GPIO 25BL(backlight enable): GPIO 18
LCD ST7796S(for F/G)(SPI over spidev0.0):
- SPI:
spidev0.0 DC: GPIO 22RST: GPIO 27BL(backlight enable): GPIO 18
Touch XPT2046 (for A/B/C/G):
- SPI:
spidev0.1 IRQ(pen-irq): GPIO 17
Touch GT911 (for F):
- I²C bus:
i2c-1 - I²C addr:
0x14(7-bit) INT: GPIO 4RST: GPIO 17
Adjust as needed if your hat uses different pins.
Nerves builds depend on MIX_TARGET. If it is unset, the project runs on the host for fast cycles and utility tasks.
Typical targets: rpi3, rpi4, rpi5.
See the full list of supported Nerves targets.
Key environment variables:
MIX_TARGET– Nerves system target (e.g.,rpi3)LCD_TYPE– one ofa|b|c|f|g(defaulta)NERVES_WIFI_SSID,NERVES_WIFI_PASSPHRASE– Wi-Fi credentials
Other notable config:
regulatory_domainset to"JP"inconfig/target.exs- SSH keys are required for shell/OTA (reads
~/.ssh/id_*.pub)
