I am designing a smart (or at least I hope so) onboard bicycle light system. The system will have an Arduino (currently prototyping with UNO) and a subsystem composed of a "panel" of buttons and leds.
This panel should stay at the handlebar, connected by multi-wire cable to the Arduino located elsewhere on the bicycle.
In order to read an arbitrary number of push-buttons, I plan to use CD4021 IC with
shiftIn() function. And, in order to turn an arbitrary number of leds on and off, I plan to use 74HC595 IC and the
My doubts are: what should I consider in order to do so?
How many wires should I need to connect an arduino to the panel circuit containing the ICs? I believe it is 8 wires (two for the power, three for shifting in [latch, clock, data], and three for shifting out), right?
Can I use any pin I want? Or is it required to use specific pins?
Is that the "right way" of doing this? Any suggestion or improvement is welcome!