Disclaimer: 9to5gadgets.com is a participant of the Amazon Services LLC Associates Program. Any valid purchases made through clicking on the links on this site (when directed to Amazon) will garner us a commission.

How To Use an SW2812B 8x8 Matrix To Create an RGB Pocket Light


If you're into photography then there's a good chance you've thought about buying yourself an RGB pocket light to give your pictures a little extra life. However, today we're going to save you a bundle and we're going to cover how to turn an 8x8 SW2812B matrix into an RGB pocket light using an Arduino-compatible board, a potentiometer, and a 10uF capacitor.

Without further ado, let's get on with this Arduino tutorial.

For this project you're going to need:

Unfortunately, the components we need to use aren't available on Fritzing so I'm going to go ahead and explain the connection in plain English. Don't worry, it's going to be very clear. In any case, you can see all of this clearly in the short we posted on YouTube. 

Connect the arduino to 5V.
Connect the breadboard to the arduino's 5V and GND pins.
Connect pin 6 to the 8x8 SW2812B's IN pin.
Connect the V- pin on the SW2812B to the GND on the breadboard and the V+ to the 5V on the breadboard.
Insert the potentiometer on the breadboard connecting the two legs to the power and ground.
Place a 10uf capacitor in between the power and ground connections with the side that has a black stripe connecting to the ground.
Connect the third leg of the Potentiometer to A0.

Once you've got the setup complete you're going to upload the code. 

Run the code and you're done. You have successfully created your own pocket light for far less than the cost of a traditional pocket light. In the future, you might want to do some improvements like removing the breadboard and connecting the potentiometer directly to the board or use a battery. We'll explore this as we move into version 2.0 of the pocket light so stay tuned for more Arduino tutorials.