by bayesianbot · 2y ago · 0 comments
Or you could use shift registers which cost a few USD cents.
On a personal project a long long time ago, I recall using daisy-chained shift registers to control a stupidly high number of relays (think 100+), at an extra BOM cost of around $1.
The relay switching time was still much, much larger than the time it took to bit-bang the daisy-chained shift registers for all relays.