How layeddie/bird_app works
Main Components
A. Hardware Layer:
• Raspberry Pi 3 as the main controller
• Connected peripherals:
• Camera (Pi Camera V2)
• LED (GPIO 18)
• Servo Motor (GPIO 23)
• DHT22 Sensor (GPIO 4)
B. Software Components:
• Three main applications:
1. bird_app_firmware (Nerves firmware application)
2. bird_app_hardware (Hardware interface layer)
3. bird_app_ui (Phoenix web application)
┌─ User Interface Layer ─────────────────────┐
• Web Dashboard (Phoenix LiveView) │
• Telegram Bot Interface │
• ┬───────────────────────┘
• ↕
┌─ Application Layer ─────────────────────────┐
• BirdAppUi │
• Phoenix Endpoints │
• Live Components │
• Controllers │
• Channels │
• ┬───────────────────────┘
• ↕
┌─ Hardware Interface Layer ──────────────────┐
• BirdAppHardware │
• Camera Module │
• LED Controller │
• Servo Controller │
• DHT Sensor Module │
• ┬───────────────────────┘
• ↕
┌─ Firmware Layer ───────────────────────────┐
• BirdAppFirmware (Nerves) │
• Hardware Initialization & Management │
• ┬───────────────────────┘
• ↕
┌─ Physical Hardware Layer ──────────────────┐
• Raspberry Pi 3 │
• Camera V2 │
• LED (GPIO 18) │
• Servo Motor (GPIO 23) │
• DHT22 Sensor (GPIO 4) │
• ┘
Data Flow Indicators
• User interactions from UI to hardware
• Sensor data flow from hardware to UI
• Camera stream flow
• Telegram bot communications
• Temperature/humidity data flow
• LED and servo control signals
Component Details
For each major component, include:
• Name
• Primary function
• Key dependencies
• Communication protocols
Notes
• Keep the production vs development environment configurations visible
• Read-only nature of the Nerves root filesystem
• Network configuration options (WiFi setup)
• Static asset compilation and deployment flow
Remember to maintain a balance between showing enough detail to understand the system while keeping it clean and readable. The focus should be on the interaction between the three main applications (firmware, hardware, and UI) and how they interface with the physical components.