Approach A · DIY Camera Build

Sweet Potato
Build Guide

Author: Luca SBC: Libre Computer AML-S905X-CC-V2 Started: October 2025 Updated: January 31, 2026
Phase 4 — System Integration & UI Planning

1. Project Overview

The Tender Camera is a sustainable, modular digital camera built from a single-board computer and open-source software. The name "Sweet Potato" refers to the SBC used: the Libre Computer AML-S905X-CC-V2, whose community nickname is "Sweet Potato."

Goals

2. Hardware

SBC — Libre Computer Sweet Potato (AML-S905X-CC-V2)

SpecificationValue
SoCAmlogic S905X
CPUQuad-Core ARM Cortex-A53 @ 1.5GHz
RAM2GB DDR3
GPUMali-450 MP5
USB Ports4× USB 2.0 (Type A)
Video Output1× HDMI 2.0
StorageMicroSD slot
Network1× 100Mbps Ethernet (RJ45)
Power5V/2A via USB-C
GPIO40-pin header (Raspberry Pi compatible layout)
Dimensions85mm × 56mm
⚠️ The Sweet Potato has no built-in WiFi or Bluetooth — all wireless connectivity requires external USB adapters.

USB Port Allocation (as of 2026-01-31)

PortDeviceUSB ID
USB 1Genesys Logic Hub (internal)05e3:0610
USB 2Sony IMX179 Camera0bda:5805
USB 3Waveshare Touch Controller0eef:0005
USB 4Trust Keyboard (dev only)145f:02c9

Display — Waveshare 4.3inch HDMI LCD (B)

SpecificationValue
Size4.3 inches
Resolution800×480 (landscape native)
Planned orientationPortrait (480×800 after rotation)
PanelIPS, 160° viewing angle
Touch typeCapacitive, 5-point multitouch
Touch interfaceUSB — appears as /dev/input/event0
Display interfaceHDMI
The physical buttons on the display (Menu, OK, Direction, Return, Power) are controlled by the RTD2660H display controller — they are not accessible to the OS. For a shutter button, wire a tactile switch to the GPIO header and read it via libgpiod.

Camera — Sony IMX179 USB Module

SpecificationValue
ModelDSJ-3879-HE
SensorSony IMX179
Sensor size1/3.2"
Resolution8 Megapixels (3264×2448)
InterfaceUSB 2.0
ProtocolUVC — driver-free on Linux
Lens mountM12 (interchangeable)
USB ID0bda:5805

Supported Resolutions (MJPG — recommended)

ResolutionFPSMegapixelsUse case
3264×2448158.0 MPMaximum quality stills
1920×1080302.1 MPFull HD video / viewfinder
1280×720300.9 MPHD video
640×480300.3 MPFast preview
MJPG compresses on the camera module itself — this is why high resolutions are possible over USB 2.0. Raw YUYV is limited to 640×480 at 30fps by USB bandwidth.

Connection Diagram

                ┌──────────────────────┐
                │   Sweet Potato SBC   │
                │  (AML-S905X-CC-V2)   │
                │                      │
Ethernet ───────┤ RJ45                 │
                │ HDMI ────────────────┼──── Waveshare Display
                │ USB1 ────────────────┼──── IMX179 Camera
                │ USB2 ────────────────┼──── Waveshare Touch (USB)
                │ USB3 ────────────────┼──── Trust Keyboard (dev only)
                │ USB4 ────────────────┼──── [Future: WiFi Adapter]
                │ USB-C (power) ───────┼──── 5V/3A PSU
                │ MicroSD: 128GB       │
                └──────────────────────┘

3. Software Stack

Operating System

PropertyValue
DistributionArmbian 25.11.2 noble
BaseUbuntu 24.04 LTS
Kernel6.12.58-current-meson64
Architectureaarch64
Package managerapt
Hostnamesweet-potato
Usermycamera
Earlier documentation described this system as running Arch Linux ARM with pacman. The system now runs Armbian (Ubuntu-based). All pacman commands in older notes should be replaced with apt equivalents.

Packages to Install

sudo apt update

# Camera capture
sudo apt install fswebcam

# Input device debugging
sudo apt install evtest

# Framebuffer image viewer
sudo apt install fbi

# UI framework (Phase 2)
sudo apt install python3-kivy

# Computer vision (Phase 4)
sudo apt install python3-opencv

# WiFi driver compilation (when needed)
sudo apt install linux-headers-$(uname -r)

Already present in Armbian (no install needed):

Key Package Explanations

uvcvideo (kernel built-in)
The USB Video Class driver. Any UVC-compliant camera is supported automatically. The Sony IMX179 appeared as /dev/video1 immediately on boot with no configuration.

v4l-utils
Video4Linux utilities. v4l2-ctl lists detected cameras, queries supported resolutions and formats, and sets camera parameters from the terminal.

fswebcam
Minimal command-line tool for capturing stills from a V4L2 camera. Handles format negotiation and JPEG saving in one command — ideal for the MVP phase.

evtest
Reads raw Linux input events from /dev/input/event*. Used to verify the touchscreen is sending correct coordinates (ABS_X, ABS_Y) and touch events (BTN_TOUCH).

fbi
Framebuffer image viewer. Displays images directly on screen without a desktop environment — essential for a headless kiosk device.

python3-kivy
Touch-native Python UI framework. Renders directly to the framebuffer without X11. Layouts are written in declarative .kv files, separating design from logic.

4. Camera Setup

Device Mapping

DeviceDescriptionUse?
/dev/video0Amlogic hardware video decoder (SoC built-in)❌ NOT the camera
/dev/video1Sony IMX179 camera (uvcvideo)✅ USE THIS
/dev/video2Camera metadata streamRarely needed
⚠️ Always use /dev/video1. The SoC's hardware video decoder creates a /dev/video0 device — it is not the camera.

Verified Working Commands

# List all video devices
v4l2-ctl --list-devices

# Check supported formats and resolutions
v4l2-ctl -d /dev/video1 --list-formats-ext

# Capture a full 8MP still
fswebcam -d /dev/video1 -r 3264x2448 --no-banner photo.jpg

# Capture with timestamp filename
fswebcam -d /dev/video1 -r 1920x1080 --no-banner "photo_$(date +%Y-%m-%d_%H-%M-%S).jpg"

# View image on the display
sudo fbi -T 1 -a photo.jpg   # press q to quit
🎉 First capture milestone: January 31, 2026, 17:58 — test_8mp.jpg — 2.8MB — 3264×2448

5. Touchscreen Setup

Device Mapping

DeviceNameUse?
/dev/input/event0WaveShare WS170120✅ Touchscreen
/dev/input/event1–3SIGMACHIP Trust KeyboardDevelopment only
/dev/input/event4meson-ir (IR receiver)Not used

Testing Touch Input

# List input devices
sudo evtest

# Select device 0 (WaveShare WS170120)
# Touch the screen — you should see ABS_X, ABS_Y, and BTN_TOUCH events
# Press Ctrl+C to stop
Touchscreen confirmed fully working on 2026-01-31.

6. Network Notes (FHNW University Network)

ICMP (ping) is blocked by the university firewall. Do not use ping to test internet connectivity. Use these instead:

sudo apt update              # Confirms DNS + HTTP — best test
resolvectl query google.com  # Tests DNS only
curl -I https://google.com   # Tests HTTP only

7. UI/UX Plan

Feature Phases

PhaseFeatures
Phase 1 — MVPTouch capture button, status indicators, kiosk boot, CLI escape hatch
Phase 2Live viewfinder, photo gallery, delete controls
Phase 3Video mode, timelapse, settings panel
Phase 4Face detection, object recognition, custom metadata, filters

UI Framework Decision

After evaluating PyGame, GTK4, Qt/QML, and a web kiosk approach, Python + Kivy was selected:

Screen Layout (portrait 480×800)

Screens to design: Capture (main), Gallery, Photo View, Settings, Boot/Splash. Touch targets must be at least 44×44px. Aesthetic: permacomputing-inspired — minimal, functional, deliberate.

8. Design Decisions

DecisionChoiceReasoning
Screen orientationPortrait (480×800)Distinctive camera feel
Photo storageInternal SD card111GB available; USB ports needed for peripherals
File namingTimestamp (YYYY-MM-DD_HH-MM-SS.jpg)Sortable, no conflicts
Photo directory/home/mycamera/photos/Simple, within user home
UI frameworkPython + KivyTouch-native, low resources, framebuffer mode
Boot modeKiosk (direct to app)Feels like a dedicated camera
Debug accessKeyboard at boot → CLIKeeps the device hackable

9. Known Issues

IssueStatus
WiFi adapter not yet installedPending — needs linux-headers + driver compilation
No UI yetIn planning — framework confirmed, spec written
ping blocked on FHNW networkResolved — use apt update instead