Hi everybody,
For a friend I'm making a project with leds strip.
So he give me all the items:
- Arduino Mega 2560
- Shield V2.2
- Touchscreen display 3.2"
- Power supply 5V / 10A (Lien)
- Adafruit RGBW 60LEDS/m - 4m (Lien)
The Strange thing is this: I tested the LEDS without the display, with the power coming from the Arduino. That was working perfectly.
Because I need more power for the application, I needed the power supply for the Ledstrip.
But when I tried with the power supply and just a test code, it is like the leds are taking a random color, even Leds that I didn't adressed with a color.
I checked the power supply, it is at 5.2V at the beginning of the strip and 4.8 at the end.
And the documentation of adafruit is saying that it is OK for 5V, maximum 6V input.
So it seems OK.
From the arduino, thre is a 470 Ohm resistor between the DIN pin and the PWM pin from arduino.
But I reeded that somebody is using a 100µF capacitor between the 5V and the GND, do I need it?
Do you know where this bug can came from?
Below you'll find the code to test it.
#include <UTFT.h>
#include <URTouch.h>
#include <Adafruit_NeoPixel.h>
#define LED_PIN 9
#define NB_LED 240
//==== Creating Objects
UTFT myGLCD(ILI9341_16,38,39,40,41); //Parameters should be adjusted to your Display/Schield model
URTouch myTouch( 6, 5, 4, 3, 2);
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NB_LED, LED_PIN, NEO_GRBW + NEO_KHZ800);
//==== Defining Variables
extern uint8_t SmallFont[];
extern uint8_t BigFont[];
extern uint8_t SevenSegNumFont[];
int x, y;
char currentPage, selectedUnit;
// RGBW LEDs
int GreenLed = 0;
int RedLed = 0;
int BlueLed = 50;
int WhiteLed = 0;
int Tempo = 200;
// ====== Main Funtions ======
void setup() {
// Initial setup
myGLCD.InitLCD();
myGLCD.clrScr();
myTouch.InitTouch();
myTouch.setPrecision(PREC_MEDIUM);
//Setup des LEDS
strip.begin();
strip.show(); // Initialise tous les pixels à 'off'
//Setup de l'écran
drawHomeScreen();
}
void loop() {
// Home Screen
for (int i = 0; i < (NB_LED/2); i++) {
strip.setPixelColor(i, RedLed, GreenLed, BlueLed, WhiteLed);
strip.show();
delay(Tempo);
}
delay(1000);
}
Thanks,
Alex