Luca Soltoggio built SecurePair, an Arduino library that lets two ESP32s exchange encrypted keys using a single LED on each board as both transmitter and receiver. No extra hardware. The trick is basic physics: an LED operated in reverse bias functions as a photodiode, detecting light from its counterpart.
SecurePair is not a toy demo. It supports ESPNow and LoRa as transport layers, meaning the intended workflow is light-based pairing followed by encrypted wireless communication. The library is not limited to two nodes. Scale it up and the same logic holds.
The original article is short, but the GitHub repository is where the real detail lives. Read it to understand how key exchange over visible light actually gets implemented in software, and why this approach sidesteps the complexity that kills most DIY optical link projects before they start.
[READ ORIGINAL →]