# jruales/pokemon-shiny-hunting-bot architecture

> Architecture diagram of the GitHub repository jruales/pokemon-shiny-hunting-bot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jruales/pokemon-shiny-hunting-bot
- Repository: https://github.com/jruales/pokemon-shiny-hunting-bot

## Overview

##### Project type and purpose
- This is a hybrid embedded-plus-computer-vision application. Its goal is to perform “soft resets” on a Nintendo 3DS game console via Arduino, capture the game’s video output on a host PC, analyze frames with OpenCV (Python), and stop the reset loop the moment a “shiny” Rowlet appears.
- Key indicators:
- An “Arduino” folder containing a .ino sketch that implements the reset logic.
- A “Host” folder with a Python script (ShinyDetector.py) and image‐evidence storage.
- README referencing Arduino + Python OpenCV and a YouTube demo.

##### File structure
- Top-level:
- Arduino/
– Shiny_Rowlet.ino (sketch controlling button presses, soft resets)
– sketch.json (metadata for Arduino IDE)
- Host/
– ShinyDetector.py (captures frames, runs CV pipeline, issues commands)
– img/evidence/PLACEHOLDER.md (folder for saving screenshots when a shiny is detected)
- README.md and LICENSE
- The split into “Arduino” vs. “Host” already suggests two main runtime components: microcontroller firmware vs. host-side computer vision.

##### README for additional insights
- Describes workflow: Arduino performs resets, host runs Python OpenCV, stops Arduino when criteria met.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Nintendo 3DS Console" 
        Console["Game Console"]:::hardware
    end

    subgraph "Camera / Capture Device"
        Camera["Camera"]:::hardware
    end

    Console -->|"Video Signal"| Camera

    subgraph "Host PC"
        subgraph "Computer Vision (Python)"
            SD["ShinyDetector.py"]:::software
            ES["Evidence Storage"]:::storage
            PH["PLACEHOLDER.md"]:::storage
        end
    end

    Camera -->|"Frame Buffer"| SD
    SD -->|"Save Evidence"| ES
    ES --> PH

    subgraph "Arduino Microcontroller"
        FW["Shiny_Rowlet.ino"]:::software
        SM["sketch.json"]:::software
    end

    SD -->|"DETECT_SHINY"| FW
    FW -->|"Button Presses (Reset)"| Console

    README["README.md"]:::docs
    LICENSE["LICENSE"]:::docs

    click FW "https://github.com/jruales/pokemon-shiny-hunting-bot/blob/master/Arduino/Shiny_Rowlet.ino"
    click SM "https://github.com/jruales/pokemon-shiny-hunting-bot/blob/master/Arduino/sketch.json"
    click SD "https://github.com/jruales/pokemon-shiny-hunting-bot/blob/master/Host/ShinyDetector.py"
    click ES "https://github.com/jruales/pokemon-shiny-hunting-bot/tree/master/Host/img/evidence/"
    click PH "https://github.com/jruales/pokemon-shiny-hunting-bot/blob/master/Host/img/evidence/PLACEHOLDER.md"
    click README "https://github.com/jruales/pokemon-shiny-hunting-bot/blob/master/README.md"
    click LICENSE "https://github.com/jruales/pokemon-shiny-hunting-bot/tree/master/LICENSE"

    classDef hardware fill:#ADD8E6,stroke:#000;
    classDef software fill:#90EE90,stroke:#000;
    classDef storage fill:#FFD580,stroke:#000,stroke-dasharray: 2 2;
    classDef docs fill:#D3D3D3,stroke:#000;
```
