Add basic support for duinoNodes shift register handling via IOExpander#501
Open
logicallysynced wants to merge 2 commits into
Open
Add basic support for duinoNodes shift register handling via IOExpander#501logicallysynced wants to merge 2 commits into
logicallysynced wants to merge 2 commits into
Conversation
This was referenced Jan 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have been tinkering with a personal fork of the EX-IOExpander codebase to see if I could add shift-register support.
My primary objective was to add support for duinoNodes (DNIN8, DNOU8, etc.) directly connected to an Arduino running EX-IOExpander.
This is the CommandStation-EX portion of the codebase, please use it for reference as needed. For the EX-IOExpander code, please visit this PR:
DCC-EX/EX-IOExpander#64
Adds a new IODevice implementation that exposes DuinoNodes-style shift-register nodes via an EX-IOExpander device.
Introduces IO_DNShiftExpander, an IODevice subclass that bridges VPIN-based configuration (HAL config) <-> EX-IOExpander shift commands (I2C).
The device is configured with:
Includes some basic checks to ensure the 3x control VPINs all belong to the same EX-IOExpander instance and are within its VPIN range.
Adds a _display() implementation so the device is identified in diagnostics as a DNIN/DNOU node “via EXIO” instead of showing up as an unknown device.
To simplify the implementation, I created new device classes called IO_DNIN8V, IO_DNIN8KV & IO_DNOU8V which can be used to reference a duinoNode on an IOExpander. For example:
The above example defines an EX-IOExpander and assigned a DNIN8 duinoNode at VPIN 409, 410 & 411 on that Expander.