How cyberhorizonltd/4wire works
Project type and purpose
• 4wire is a *protocol library* (not a web app or microservice).
• Its purpose is to let two devices (microcontrollers or small computers) communicate over four GPIO lines at >1 kb/s.
• The repository provides *platform-specific sender/receiver examples* for ESP32, Heltec WiFi Lora, Raspberry Pi Pico, Raspberry Pi 5, Ubuntu and Windows.
File structure
• There are no “frontend” or “backend” folders—this is embedded/IoT code.
• The top‐level sources/ directory holds all implementations:
• *_sender.* (C++ or Python)
• *_receiver.* (C++ or Python)
• Configuration (pin definitions) is done in source files.
• No deployment scripts—these are cross‐compiled or run directly on the target hardware.
README for additional insights
• It defines a *hierarchical model* with two roles: Sender and Receiver.
• The four signals are: clock, data, notify, enable.
• The communication is synchronous: the Sender toggles clock/data/notify, the Receiver responds via enable.
Putting it all together
1) Sender asserts notify → Receiver
2) Receiver asserts enable → Sender
3) Sender toggles clock/data for each bit
4) Receiver reads data, de-asserts enable
5) Repeat until notify is de-asserted