I know this has been answered somewhere but can't find the solution online.
I have an 8ch 5v->120VAC relay controlled by arduino and need help using less digital pins. All channels need to be individually controlled on or off. Space is also an issue as it's on a shield. I've done this in class and reread this link) but am stuck on the coding.
The existing code has 8 variables for each relay's ON/OFF state. These would need to be passed directly to the relay (vs stepped/shifted one at a time like a chase pattern).
Chips on hand: 74HC595
Also have these if needed: (4051,4520,4514,4027,4099)