https://github.com/bjoernq/i2c-dummy-device
ESP32-C3 as I2C dummy device
https://github.com/bjoernq/i2c-dummy-device
Last synced: 25 days ago
JSON representation
ESP32-C3 as I2C dummy device
- Host: GitHub
- URL: https://github.com/bjoernq/i2c-dummy-device
- Owner: bjoernQ
- License: apache-2.0
- Created: 2023-01-31T17:05:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-23T07:33:00.000Z (about 2 years ago)
- Last Synced: 2025-10-07T09:56:17.038Z (10 months ago)
- Language: Rust
- Size: 16.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# i2c-dummy-device on ESP32-C3
## What is this?
This simulates an I2C device via bit-banging.
It ACKs on all 7-bit addresses and returns the data `b"012345678901234567890123456789"` for every register.
The code is intentionally not fancy - it's not even using interrupts.
When using it with e.g. an SSD1306 display driver you *need* to disable the console output. (`VERBOSE`) - also always run in release mode.
SDA is on GPIO 1, SCL is on GPIO 2.
Additionally it can simulate clock-stetching by changing `CLOCK_STRETCH_DELAY_US`
If it doesn't work you might need to add external pull-up resistors.
This is really just for testing purposes - it might crash or act weird in many ways.