Maker Pro
Maker Pro

Please Help!!! Need circuit board that can independently fire 22 leds.

I am a gamer and I am making a project in which there is a map of the videogame "fortnite" and there is leds at each named location. The system chooses a random location and light up that LED. I have been coding this is python. I have a raspberry pi but there is a not GPIO pins for me to have 22 different leds. Can I make this work? Do I have to buy a new circuit board? Help Please!!!!!!
 
The only thing I know about raspberries is the jam.
To get 22 different leds, you will need 22 leads or you may be able to make a matrix. 5 by 5 = 25 . To do this will need 10 leads, 5 to output positive and 5 to output negative.
 
Look at any 4-16 line decoder (74LS154 etc) which will 'drive' any one of 16 outputs based on a 4-bit input. With 5-bits you can use two of them for 32 potential outputs.
 
When only 1 is lit at a time, charlieplexing is probably the best solution. 6 outputs will do it, with no other chips needed.

Bob
 
Top