Use digitalWrite instead of pinMode - #388
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the TM1637 (segment display) bit-banging implementation in LedControl_dual to use digitalWrite() for clock/data transitions instead of repeatedly switching pin modes, and updates the bus idle behavior.
Changes:
- Configure TM1637 CLK/DIO as
OUTPUTand idle themHIGHduringbegin(). - Update TM1637
start()/stop()to drive levels withdigitalWrite()rather thanpinMode()transitions. - Rewrite the TM1637 byte write loop to clock bits using
digitalWrite()and adjust ACK handling.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Board and firmware folder for this pull request: |
|
Board and firmware folder for this pull request: |
|
Board and firmware folder for this pull request: |
|
Board and firmware folder for this pull request: |
|
Board and firmware folder for this pull request: |
|
Board and firmware folder for this pull request: |
|
Board and firmware folder for this pull request: |
Description of changes
We changed the TM1637 data exchange protocol from Open drain to Push-Pull. This allows for faster update times while maintaining compatibility to all TM1637 modules on the market, including those that have a very large cap values on the data lines and deviates from the datasheet recommendations.
part of #381