Expanding shift register code

Hello

optionSwitch is a 32 bits variable, so it can hold only 32 buttons states.

You cannot just increase the iterations of the for loop.

You have to use another method of storing the buttons states. The easiest way is to use an array, where each element of the array contains one button state. It will waste memory, using at least one byte per button state, instead of one bit.

1 Like