My RC controlled LED's. This is what I've got so far..

My RC controlled LED’s.

This is what I’ve got so far…

ws2811 LED’s
Ran on Uno
RC Receiver supplying variable PWM to change the LED pattern speed.

I am having problems with the speed.
Seems my code is inefficient. I would like the LED’s to go fairly slow to begin with, then get super fast at the top of the Throttle control you see me move in the vid.

Here’s the code it’s running on now.
Anyone have any suggestions on how to get more dynamics thru the sticks entire movement(very slow to super fast)? Seems it changes the most at the last 3rd of the stick movement.

The point of all this is to put the led’s on a multirotor/drone and have it respond to the RC’s controls while flying.

#include <SD.h>

#include “FastLED.h”

// How many leds in your strip?
#define NUM_LEDS 60

// 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 6
#define CLOCK_PIN 13
int rcPin = 10; // PWM signal arduino pin
int Speed = 0; // Receiver channel 1 pwm value
// Define the array of leds
CRGB leds[NUM_LEDS];

void setup() {
FastLED.addLeds<NEOPIXEL,DATA_PIN>(leds, NUM_LEDS);
pinMode(rcPin, INPUT);
Serial.begin(9600);
}

void loop() {
// First slide the led in one direction
for(int i = 0; i < (NUM_LEDS / 8) - 1; i++) {
// Set the i’th led to red

leds[i] = CRGB::DarkViolet ;
leds[NUM_LEDS - i -1] = CRGB::DarkViolet ;
// Show the leds
FastLED.show();

// now that we’ve shown the leds, reset the i’th led to black
leds[i] = CRGB::Black;
leds[NUM_LEDS - i -1] = CRGB::Black;
// Wait a little bit before we loop around and do it again
delay(Speed);

}
Speed = pulseIn(rcPin, LOW);
Speed= (Speed -19900)/25;
if (Speed <=0) {
Speed=0;
}

for(int i= 8;i < (NUM_LEDS / 4) - 1; i++) {
// Set the i’th led to red

leds[i] = CRGB::DarkViolet ;
leds[NUM_LEDS - i -1] = CRGB::DarkViolet ;
// Show the leds
FastLED.show();

// now that we’ve shown the leds, reset the i’th led to black
leds[i] = CRGB::Black;
leds[NUM_LEDS - i -1] = CRGB::Black;
// Wait a little bit before we loop around and do it again
delay(Speed);

}

Speed = pulseIn(rcPin, LOW);

Speed= (Speed -19900)/25;
if (Speed <=0) {
Speed=0;
}

for(int i= 15;i < (NUM_LEDS / 3) +2; i++) {

// Set the i’th led to red

leds[i] = CRGB::DarkViolet ;
leds[NUM_LEDS - i -1] = CRGB::DarkViolet ;
// Show the leds
FastLED.show();

// now that we’ve shown the leds, reset the i’th led to black
leds[i] = CRGB::Black;
leds[NUM_LEDS - i -1] = CRGB::Black;
// Wait a little bit before we loop around and do it again
delay(Speed);

}

 Speed = pulseIn(rcPin, LOW);

Speed= (Speed -19900)/25;
if (Speed <=0) {
Speed=0;
}

  for(int i= 22;i < (NUM_LEDS / 2) -1; i++) {

// Set the i’th led to red

leds[i] = CRGB::DarkViolet ;
leds[NUM_LEDS - i -1] = CRGB::DarkViolet ;
// Show the leds
FastLED.show();

// now that we’ve shown the leds, reset the i’th led to black
leds[i] = CRGB::Black;
leds[NUM_LEDS - i -1] = CRGB::Black;
// Wait a little bit before we loop around and do it again
delay(Speed);

}

Speed = pulseIn(rcPin, LOW);

Speed= (Speed -19900)/25;
if (Speed <=0) {
Speed=0;
}

// Now go in the other direction.

for(int i = (NUM_LEDS / 2); i > 22; i–) {

// Set the i’th led to red
leds[i] = CRGB::Red;
leds[NUM_LEDS - i -1] = CRGB::Red;
// Show the leds
FastLED.show();

// now that we’ve shown the leds, reset the i’th led to black
leds[i] = CRGB::Black;
leds[NUM_LEDS - i -1] = CRGB::Black;
// Wait a little bit before we loop around and do it again
delay(Speed);
}

for(int i = 22; i > 15; i–) {

// Set the i’th led to red
leds[i] = CRGB::Red;
leds[NUM_LEDS - i -1] = CRGB::Red;
// Show the leds
FastLED.show();

// now that we’ve shown the leds, reset the i’th led to black
leds[i] = CRGB::Black;
leds[NUM_LEDS - i -1] = CRGB::Black;
// Wait a little bit before we loop around and do it again
delay(Speed);
}
Speed = pulseIn(rcPin, LOW);
Speed= (Speed -19900)/25;
if (Speed <=0) {
Speed=0;
}

for(int i = 15; i > 8; i–) {

// Set the i’th led to red
leds[i] = CRGB::Red;
leds[NUM_LEDS - i -1] = CRGB::Red;
// Show the leds
FastLED.show();

// now that we’ve shown the leds, reset the i’th led to black
leds[i] = CRGB::Black;
leds[NUM_LEDS - i -1] = CRGB::Black;
// Wait a little bit before we loop around and do it again
delay(Speed);
}
Speed = pulseIn(rcPin, LOW);
Speed= (Speed -19900)/25;
if (Speed <=0) {
Speed=0;
}

for(int i = 8; i > 0; i–) {

// Set the i’th led to red
leds[i] = CRGB::Red;
leds[NUM_LEDS - i -1] = CRGB::Red;
// Show the leds
FastLED.show();

// now that we’ve shown the leds, reset the i’th led to black
leds[i] = CRGB::Black;
leds[NUM_LEDS - i -1] = CRGB::Black;
// Wait a little bit before we loop around and do it again
delay(Speed);
}
Speed = pulseIn(rcPin, LOW);
Speed= (Speed -19900)/25;
if (Speed <=0) {
Speed=0;
}
}

I’m sure I have made way more code that is necessary… the rate of the led’s get’s slowed down considerably if I check the PWM duration each time the LED’s move…
I tried only to check the PWM about every 7th LED rendered (on one half).
guess the PWM code is very intensive…

Thank for any help/suggestions!
~Blaine