I have an Arduino set-up in which I need a few more pins than the Arduino Leonardo can provide. Specifically, I have three digital pins available, but require 5 digital pins. Of those 5 pins, three will be used as digital inputs for switches, and two will be used as digital outputs for LEDs.
I'm not particularly familiar with muxing-demuxing. Is it possible to use a single 4051 as both digital input and digital output? Or can it only be used either as digital input or as digital output?
I also have a CD4021BE available...perhaps this would be a better choice?