If the leds need to be either on or off, you could get a cheap shift register (or four). Something like this:
Then use the shift out to control it:
You can daisy chain 4 of them to control your 32 leds
If the leds need to be either on or off, you could get a cheap shift register (or four). Something like this:
Then use the shift out to control it:
You can daisy chain 4 of them to control your 32 leds