Software bitbang I2C and 1-Wire library for long-distance wiring
- Pure software bitbang – No hardware I2C/1-Wire peripheral needed
- Wide I2C frequency range – 1 Hz to 1 MHz+
- Long distance wiring (I've tested 100 meters twisted pair)
- Clock stretching support – Handles slow slave devices with configurable timeout
- Non-blocking DS18B20 – State machine based, doesn't block your main loop
- Fixed-point data – No floating point overhead (optional float support for SHT3X)
- Platform abstraction – Clean separation between core logic and hardware
- ESP32 (Xtensa and RISC-V based)
- STM32F1
- ESP-IDF
- Platformio
I2C devices:
SHT3X
DS3231
1-Wire:
DS18B20
ESP-IDF
idf_component.yml:
dependencies:
longwires:
git: https://github.com/ostymate/longwires.git
version: "main"Platformio
platformio.ini:
lib_deps =
https://github.com/ostymate/longwires.git