Having trouble with 4 wire digital led strip

I am new to this Arduino world. So I did some test projects with my Arduino Mega to confirm it worked. Those went fine.

Now I am trying to use it to control a 2 meter 4 wire digital RGB strip (Flex Pixel #FLX775). It used 5V.

I have seen all kinds of LED -Arduino wiring diagrams, many with MOSFETs and resistors. But the simplest one seems to just connect the LED strip directly to the Mega board, so that is what I have done.

I have connected the ground both to the LED strip and the GRD pin on the board. The Data wire is connected to pin #11 and the clock wire to pin #13.

I have tried several FastLED sketches but I get the same error.

I would so appreciate any help.

  • Harry

Here is a simple LED sketch I have tried:

#include “FastLED.h”
// How many leds in your strip?
#define NUM_LEDS 144
// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 11
#define CLOCK_PIN 13
// Define the array of leds
CRGB leds[NUM_LEDS];
void setup() {
// Uncomment/edit one of the following lines for your leds arrangement.
// FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
// FastLED.addLeds<APA104, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<UCS1903B, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<GW6205, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<GW6205_400, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<SM16716, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<LPD8806, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<P9813, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<APA102, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<DOTSTAR, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<P9813, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<DOTSTAR, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
}
void loop() {
// Turn the LED on, then pause
leds[0] = CRGB::Red;
FastLED.show();
delay(500);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
FastLED.show();
delay(500);
}

And here is the error message:

Arduino: 1.8.12 (Mac OS X), Board: “Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)”

In file included from /Users/harry/Documents/Arduino/sketch_may09d/sketch_may09d.ino:1:0:
/Users/harry/Documents/Arduino/libraries/FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003

pragma message “FastLED version 3.003.003”

^~~~~~~~~~~~~~~~~~~~~~~~~~~
Sketch uses 3742 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 529 bytes (6%) of dynamic memory, leaving 7663 bytes for local variables. Maximum is 8192 bytes.
avrdude: ser_open(): can’t open device “/dev/cu.usbmodem3201”: No such file or directory
ioctl(“TIOCMGET”): Inappropriate ioctl for device
ioctl(“TIOCMGET”): Inappropriate ioctl for device
avrdude: ser_send(): write error: Bad file descriptor
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: Bad file descriptor
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: Bad file descriptor
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: Bad file descriptor
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: Bad file descriptor
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: Bad file descriptor
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
the selected serial port avrdude: stk500v2_getsync(): timeout communicating with programmer
does not exist or your board is not connected

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

pls edit your post and put you sketch in the <code][/code>

so it’s just not to read

But the simplest one seems to just connect the LED strip directly to the Mega board, so that is what I have done.

So why do you think that is good, just because some idiots posted it on line.
You need a resistor in each of the two lines clock and data and a capacitor on the strip input.

But your problem is simpler than that. Your computer can not see your board, so you either have your settings wrong, a faulty lead or your clone is broken.

Have you tried uploading the blink sketch?

@biggizmo
What did I tell you about commenting on others threads?

biggizmo:
pls edit your post and put you sketch in the <code][/code>

Really?

Where would I find the blink sketch?

What size of resistors should I use? What size of capacitors should I use? Is there a wiring diagram that you can post that I can replicate.

What is a broken clone?

Where would I find the blink sketch?

In the Arduino IDE menu File -> Examples -> 01Basics -> Blink

What size of resistors should I use?

220R to 470R it is not critical.

What size of capacitors should I use?

Well for 144 LEDs then I would use a 1000uF.
Also your power supply needs to be capable of supplying 60mA per LED so that is just under 9 Amps. You can not drive it from an Arduino and USB port alone.

Is there a wiring diagram that you can post that I can replicate.

Yes Basic Connections | Adafruit NeoPixel Überguide | Adafruit Learning System

What is a broken clone?

A clone is a rip off Arduino, not a real one. A broken clone is one that does not work, due to poor components or workmanship.