I'm currently working on a "rotating cube" project where a raspberry pi will be used to determine which cube face is at the top and any given time using an accelerometer and light it up with LEDs.
So, I have the bare bones working and the code pretty much there, I can have the pi light up one of six LEDs depending which way up the accelerometer is. The next step would be to have 9 LEDs light up for each face, however I know that the GPIOs have a current limit that should not be exceeded (~50 mA).
So I need on some advice on how to go about this as I am abit of a noob when it comes to electronics. What I was thinking to do was to use a relay board to supply each set of 9 LEDs with more power, something like this;
So my understanding is ill be able to control the relays from the pi, but use an external power supply (5 V) to power the LED sets when switched?
Is this the right way of going about this? Is there a better way?
FYI these are the LEDS that i am using;