Analog to Digital LED control

Hi everyone,

Struggling a bit with a project I'm doing at the moment. I'm a bit of a noob so bear with me (also apologies if this is posted in the wrong place).

I'm writing a program in python taking frame ID data from a Leap Motion controller (based on the Leap SDK), converting it into serial commands and sending it to an Arduino, which (in theory) should control some NeoPixel style digital LED strips.

The python code currently creates 3 pieces of data (x,y,z positions derived from frame data), which are sent via serial to the arduino and mapped on to each of the R, G and B pins of an analog led strip. I have got this to work as required with a single RGB common cathode LED.

The problem is that I'm having trouble understanding if it's possible to convert this sort of code that controls analog LED strips (the 4-pin kind, with individual R, G, B and GND pins) into code that controls digital individually addressable LED strips (the 3-pin kind, with 5V, Data and GND pins). I don't actually need to individually address the LEDs at this stage; I just have digital LED strips lying around and wondered if it's possible. I can upload my current code, but really I'm just asking in theory.

TLDR; Is there a way of mapping individual R, G and B output data (used to control analog LED strips) to a single output that can be sent on the data line of a digital LED strip?

Thanks so much!

Yes, simplicity itself. Instead of using analogWrite() you would use setColor() or equivalent from the AdaFruit NeoPixel library or the FastLED library.

Don't forget that most "analog" RGB strips require 12V supply, but addressable strips often require 5V, so check before you connect. Also, addressable strips can draw a lot of current, so check that your power supply can provide enough current for the number of LEDs in your strip.

PaulRB:
Also, addressable strips can draw a lot of current, so check that your power supply can provide enough current for the number of LEDs in your strip.

Per LED, the same as for RGB strips anyway.

What you need to consider also, is that you need to feed power in parallel to the strip(s) at least every 30 LEDs (1.8 Amps) or so as the power traces in the strips are relatively lightweight.

Referring to "frames", you need to consider the mechanics of getting your data through the system; the code that updates the strip cannot be interrupted and you are talking about serial data input. So how many frame updates per second do you figure on?