# jeeva069/lifi_software_simulation architecture

> Architecture diagram of the GitHub repository jeeva069/lifi_software_simulation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jeeva069/lifi_software_simulation
- Repository: https://github.com/jeeva069/lifi_software_simulation

## Overview

#### Purpose and Scope
This repository documents a Li‑Fi software simulation: an Arduino Uno-based optical link that converts text to binary, sends it through LED blink timing, and reconstructs the data at a receiver. The runnable/demo environment is hosted externally at Wokwi.

#### Entry Points and Artifacts
- `README.md` is the primary project description and points to the live Wokwi simulation.
- `diagram[1].json` is likely the Wokwi circuit/simulation diagram artifact, defining the simulated hardware topology.
- `LiFi_Software_Simulation_Report (1).docx` contains the project’s detailed design/reporting material.

There is no source-code directory or Arduino sketch visible in the supplied tree; executable logic is therefore either embedded/referenced by the Wokwi project or absent from this repository snapshot.

#### Transmission Stage
The sender-side control flow is:
1. Accept or define a text payload.
2. Encode characters into binary.
3. Translate bits into timed LED on/off patterns.
4. Drive the transmitting LED from an Arduino Uno output pin.

The LED is the physical/virtual optical transport boundary. The architecture is described in `README.md` and likely represented electrically in `diagram[1].json`.

#### Optical Channel Boundary
The system uses visible-light signaling rather than RF networking. LED state and timing constitute the protocol carrier, so sender and receiver must agree on bit representation, timing intervals, framing, and synchronization. The circuit-level channel arrangement is expected in `diagram[1].json`.

#### Receiver and Decode Stage
The receiver observes the transmitted blink pattern through a light-sensing input, determines binary values from light presence/absence, groups bits into character data, and outputs decoded text. This closes the core flow:

text → binary encoding → LED modulation → optical signal → light detection → binary decoding → text.

The receiver behavior is described at a high level in `README.md`; implementation specifics may be captured in `LiFi_Software_Simulation_Report (1).docx` or the external Wokwi project.

#### Runtime and External Infrastructure
The material runtime is Arduino Uno firmware running in a Wokwi simulation. Wokwi is an external hosted service and is the apparent live execution entry point: `https://wokwi.com/projects/470968108227772417`. Repository artifacts provide documentation and simulation topology rather than a self-contained local build/runtime.

Main entry points: [`diagram[1].json`](https://github.com/jeeva069/lifi_software_simulation/blob/main/diagram%5B1%5D.json) (Wokwi circuit diagram), [`README.md`](https://github.com/jeeva069/lifi_software_simulation/blob/main/README.md) (Project README), [`LiFi_Software_Simulation_Report (1).docx`](https://github.com/jeeva069/lifi_software_simulation/blob/main/LiFi_Software_Simulation_Report%20(1).docx) (Li-Fi design report)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_repo["Repository artifacts"]
  node_readme["Project README<br/>documentation<br/>[README.md]"]
  node_diagram["Wokwi circuit diagram<br/>simulation topology<br/>[diagram&#91;1&#93;.json]"]
  node_report["Li-Fi design report<br/>project report"]
end

subgraph group_sender["Transmit path"]
  node_payload["Text payload<br/>input data"]
  node_encoder["Binary encoder<br/>firmware stage"]
  node_modulator["LED timing modulator<br/>firmware stage"]
  node_tx_uno["Transmitter Arduino Uno<br/>simulated MCU"]
  node_tx_led["Transmitting LED<br/>optical emitter"]
end

subgraph group_receiver["Receive path"]
  node_sensor["Light-sensing input<br/>optical receiver"]
  node_rx_uno["Receiver Arduino Uno<br/>simulated MCU"]
  node_decoder["Binary decoder<br/>firmware stage"]
  node_decoded_text["Decoded text<br/>output data"]
end

node_wokwi{{"Wokwi simulation<br/>external runtime"}}
node_channel["Visible-light channel<br/>signal protocol"]
node_timing_protocol["Timing and framing<br/>protocol contract"]

node_readme -->|"links to live demo"| node_wokwi
node_readme -.->|"describes"| node_diagram
node_report -.->|"documents design"| node_timing_protocol
node_diagram -->|"defines topology"| node_wokwi
node_wokwi -->|"runs"| node_tx_uno
node_wokwi -->|"runs"| node_rx_uno
node_diagram -.->|"models"| node_tx_led
node_diagram -.->|"models"| node_sensor
node_payload -->|"encode"| node_encoder
node_encoder -->|"bits"| node_modulator
node_modulator -->|"output timing"| node_tx_uno
node_tx_uno -->|"drives"| node_tx_led
node_tx_led -->|"emits"| node_channel
node_channel -->|"light signal"| node_sensor
node_sensor -->|"light state"| node_rx_uno
node_rx_uno -->|"recovered bits"| node_decoder
node_decoder -->|"characters"| node_decoded_text
node_timing_protocol -.->|"governs"| node_modulator
node_timing_protocol -.->|"must match"| node_decoder

click node_readme "https://github.com/jeeva069/lifi_software_simulation/blob/main/README.md"
click node_diagram "https://github.com/jeeva069/lifi_software_simulation/blob/main/diagram%5B1%5D.json"
click node_report "https://github.com/jeeva069/lifi_software_simulation/blob/main/LiFi_Software_Simulation_Report%20(1).docx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_readme,node_diagram,node_report toneBlue
class node_payload,node_encoder,node_modulator,node_tx_uno,node_tx_led toneAmber
class node_sensor,node_rx_uno,node_decoder,node_decoded_text toneMint
class node_wokwi,node_channel,node_timing_protocol toneNeutral
```

## Components

### Repository artifacts

Documentation and simulation topology are stored locally.

- [Project README](https://github.com/jeeva069/lifi_software_simulation/blob/main/README.md): documentation · Primary description and link to the live simulation. · `README.md`
- [Wokwi circuit diagram](https://github.com/jeeva069/lifi_software_simulation/blob/main/diagram%5B1%5D.json): simulation topology · Defines the simulated hardware arrangement. · `diagram[1].json`
- [Li-Fi design report](https://github.com/jeeva069/lifi_software_simulation/blob/main/LiFi_Software_Simulation_Report%20(1).docx): project report · Detailed design and reporting material. · `LiFi_Software_Simulation_Report (1).docx`

### Transmit path

Conceptual Arduino-side Li-Fi transmission flow.

- **Text payload**: input data
- **Binary encoder**: firmware stage · Converts characters to bits.
- **LED timing modulator**: firmware stage · Maps bits to timed on/off states.
- **Transmitter Arduino Uno**: simulated MCU · Drives the transmitting output pin.
- **Transmitting LED**: optical emitter · Optical transport boundary.

### Receive path

Conceptual optical detection and reconstruction flow.

- **Light-sensing input**: optical receiver · Observes transmitted light presence and absence.
- **Receiver Arduino Uno**: simulated MCU · Samples and interprets the sensing input.
- **Binary decoder**: firmware stage · Groups recovered bits into characters.
- **Decoded text**: output data

### Other components

- **Wokwi simulation**: external runtime · Hosted execution environment for Arduino Uno firmware.
- **Visible-light channel**: signal protocol · Carries light state and timing between endpoints.
- **Timing and framing**: protocol contract · Shared bit representation, intervals, framing, and synchronization.

## Connections

- Project README → Wokwi simulation: links to live demo
- Project README → Wokwi circuit diagram: describes
- Li-Fi design report → Timing and framing: documents design
- Wokwi circuit diagram → Wokwi simulation: defines topology
- Wokwi simulation → Transmitter Arduino Uno: runs
- Wokwi simulation → Receiver Arduino Uno: runs
- Wokwi circuit diagram → Transmitting LED: models
- Wokwi circuit diagram → Light-sensing input: models
- Text payload → Binary encoder: encode
- Binary encoder → LED timing modulator: bits
- LED timing modulator → Transmitter Arduino Uno: output timing
- Transmitter Arduino Uno → Transmitting LED: drives
- Transmitting LED → Visible-light channel: emits
- Visible-light channel → Light-sensing input: light signal
- Light-sensing input → Receiver Arduino Uno: light state
- Receiver Arduino Uno → Binary decoder: recovered bits
- Binary decoder → Decoded text: characters
- Timing and framing → LED timing modulator: governs
- Timing and framing → Binary decoder: must match
