Hi everyone,
~ this is my first Arduino project and I am a general beginner in electronics.
I am working an a really simple project:
Displaying a specific image on a LED matrix controlled by an Arduino Micro when a button is pushed.
So far I just wanted to try connecting the LED matrix to the Arduino and make the LED change color to see how it was reacting.
Simple, but well, it doesn't work and I have issue to understand where the problem could come from.
I bought a LED matrix that is similar to the NeoPixel NeoMatrix from Adafruit.
It's not for Adafruit but it's made with RGB NeoPixel LED WS2812-2020.
It's this piece to be precise :
The specs are the following:
Input voltage: DC 3.7 V - 5.3 V (5 V recommended)
Rated power: 5 W (max.)
Operating temperature: -25 to 65 ° C
LED type: WS 2812-2020
Luminescent color: RGB full color (G - R - B order)
Number of LEDs: 64 LED (cut not possible, cascade connection possible)
Accessory: capacitor 220 μF 16 V
I followed the recommendations from the adafruit website and put a 440Ω resistor (actually 2x220Ω in series) between the matrix and the arduino output pin (pin n6).
I haven't solder the capacitor yet, it should work without it (right ?).
Here is what it looks like:
And here is my Arduino code:
#include <Adafruit_NeoPixel.h>
#include <Adafruit_NeoPixel.h>
#define PIN 6 // input pin Neopixel is attached to
#define NUMPIXELS 64 // number of neopixels in strip
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
int delayval = 100; // timing delay in milliseconds
int redColor = 0;
int greenColor = 0;
int blueColor = 0;
void setup() {
// Initialize the NeoPixel library.
pixels.begin();
}
void loop() {
setColor();
for (int i=0; i < NUMPIXELS; i++) {
// pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
pixels.setPixelColor(i, pixels.Color(redColor, greenColor, blueColor));
// This sends the updated pixel color to the hardware.
pixels.show();
// Delay for a period of time (in milliseconds).
delay(delayval);
}
}
// setColor()
// picks random values to set for RGB
void setColor(){
redColor = random(0, 255);
greenColor = random(0,255);
blueColor = random(0, 255);
}
Nothing is happening on the LED matrix, they are not lighting up.
Is the problem from my circuit or my code ?
Can I power this Matrix from the Arduino only ?
If you have some tips on this one I would really appreciate !