This demo models the real challenges of optical communication over distance. Weather effects like fog scatter light particles, rain creates intermittent blockages, and sandstorms introduce noise. The simulation applies signal attenuation, pulse timing distortion, and random dropouts based on atmospheric density—the same phenomena that affect real line-of-sight optical systems.
HARDWARE ABSTRACTION LAYER
The codebase uses a Hardware Abstraction Layer (HAL) that separates the communication logic from the physical implementation. This means the same Morse encoding, decoding, and UI can drive real hardware—an ESP32 controlling a high-power LED and photodiode, or a Raspberry Pi with GPIO and camera-based light detection. When the physical installation is built, real transmitters and receivers plug directly into the existing system.