# carbonaeronautics/part-ii-externalleds architecture

> Architecture diagram of the GitHub repository carbonaeronautics/part-ii-externalleds, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/carbonaeronautics/part-ii-externalleds
- Repository: https://github.com/carbonaeronautics/part-ii-externalleds

## Overview

##### Project type and purpose
- This is a simple embedded‐systems tutorial project using a Teensy (Arduino‐compatible) microcontroller to drive two external LEDs.
- Purpose: demonstrate how digital I/O pins on the Teensy can be programmed to switch external LEDs on and off via a small circuit (resistors + LEDs).

##### File structure
- Top level:
- ArduinoCode/  – contains the .ino sketch(s) and any helper .h/.cpp files.
- README.md   – project overview and wiring instructions.
- There are no backend/frontend partitions or services—this is a single microcontroller codebase.

##### README for additional insights
- Describes wiring (pin → resistor → LED → ground) and points to a video tutorial.
- No complex software modules or external APIs—just low-level pin control.

##### Diagramming conventions
- Rectangle for IDE/PC
- Microcontroller block with pin labels
- Zig-zag symbol for resistors
- Diode symbol for LEDs
- Rails for VCC and GND
- Code upload (IDE → Teensy)
- Current/signal flow (Pin → Resistor → LED → GND)
- Software elements (blue)
- Hardware board (gray)
- Signal lines (green)
- Power rails (red for VCC, black for GND)

##### Detail
- Resistor values and LED polarity.
- Clearly demarcate the boundary between the firmware domain (software) and the electrical circuit domain (hardware).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Firmware Domain"
        PC["PC & IDE"]:::software
        README["README.md"]:::documentation
        USB["USB Connection"]:::signal
        Teensy["Teensy Microcontroller"]:::hardware
    end

    subgraph "Hardware Circuit"
        D5["Pin D5"]:::hardware
        R1["Resistor 220Ω"]:::hardware
        LED1["LED (Green)"]:::hardware
        D6["Pin D6"]:::hardware
        R2["Resistor 220Ω"]:::hardware
        LED2["LED (Red)"]:::hardware
        VCC["+5V Rail"]:::vcc
        GND["GND Rail"]:::gnd
    end

    README -->|"Provides Wiring Instructions"| PC
    PC -->|"Upload Code"| USB
    USB -->|"Programming Interface"| Teensy
    USB -->|"+5V Power"| VCC
    USB -->|"Ground"| GND

    Teensy -->|"D5 Output"| D5
    D5 -->|"Signal"| R1
    R1 -->|"Signal"| LED1
    LED1 -->|"Current Flow"| GND

    Teensy -->|"D6 Output"| D6
    D6 -->|"Signal"| R2
    R2 -->|"Signal"| LED2
    LED2 -->|"Current Flow"| GND

    click PC "https://github.com/carbonaeronautics/part-ii-externalleds/tree/main/ArduinoCode/"
    click README "https://github.com/carbonaeronautics/part-ii-externalleds/blob/main/README.md"

    classDef software fill:#add8e6,stroke:#000,stroke-width:1px
    classDef hardware fill:#d3d3d3,stroke:#000
    classDef signal stroke:#0f0,stroke-width:2px,stroke-dasharray:5 5
    classDef vcc fill:#f88,stroke:#000
    classDef gnd fill:#000,stroke:#000,color:#fff
    classDef documentation fill:#fff,stroke:#00f,stroke-width:1px
```
