user38292: im currently working on a stranger things letter board with an arduino and ws2811 leds and im having an issue where ever there is a space, the previous letter will be displayed. Ive tried going in and finding where it makes this duplicate, but i am rather inexperienced. Heres my code:
#include <FastLED.h>

#include <HashMap.h>

#define DATA_PIN 6 //this is the data pin connected to the LED strip. If using WS2801 you also need a clock pin

#define NUM_LEDS 50 //change this for the number of LEDs in the strip

#define COLOR_ORDER RGB

CRGB leds[NUM_LEDS];

CRGB colors[5];

int myleds[25];

int last_letter = 0;

CRGB white = CRGB(255, 255, 255);

CRGB red = CRGB (255, 0, 0);

CRGB green = CRGB (0, 255, 0);

CRGB blue = CRGB(0, 0, 255);

CRGB off = CRGB(0, 0, 0);

const byte HASH_SIZE = 28;

HashType<char, int> hashRawArray[HASH_SIZE];

HashMap<char, int> charToLed = HashMap<char, int>( hashRawArray , HASH_SIZE );

void setup() {

  FastLED.addLeds<WS2811, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS); //setting up the FastLED

  randomSeed(analogRead(0)); //seeding my random numbers to make it more random.

  myleds[0] = 47;//A

  charToLed[0]('a', 47);

  myleds[1] = 45;//B

  charToLed[1]('b', 45);

  myleds[2] = 43;//C

  charToLed[2]('c', 43);

  myleds[3] = 42;//D

  charToLed[3]('d', 42);

  myleds[4] = 40;//E

  charToLed[4]('e', 40);

  myleds[5] = 38;//F

  charToLed[5]('f', 38);

  myleds[6] = 37;//G

  charToLed[6]('g', 37);

  myleds[7] = 34;//H

  charToLed[7]('h', 34);

  myleds[8] = 32;//I

  charToLed[8]('i', 32);

  myleds[9] = 16;//J

  charToLed[9]('j', 16);

  myleds[10] = 18;//K

  charToLed[10]('k', 18);

  myleds[11] = 20;//L

  charToLed[11]('l', 20);

  myleds[12] = 22;//M

  charToLed[12]('m', 22);

  myleds[13] = 24;//N

  charToLed[13]('n', 24);

  myleds[14] = 26;//O

  charToLed[14]('o', 26);

  myleds[15] = 28;//P

  charToLed[15]('p', 28);

  myleds[16] = 29;//Q

  charToLed[16]('q', 29);

  myleds[17] = 31;//R

  charToLed[17]('r', 31);

  myleds[18] = 15;//S

  charToLed[18]('s', 15);

  myleds[19] = 13;//T

  charToLed[19]('t', 13);

  myleds[20] = 11;//U

  charToLed[20]('u', 11);

  myleds[21] = 9;//V

  charToLed[21]('v', 9);

  myleds[22] = 7;//W

  charToLed[22]('w', 7);

  myleds[23] = 4;//X

  charToLed[23]('x', 4);

  myleds[24] = 2;//Y

  charToLed[24]('y', 2);

  myleds[25] = 0;//Z

  charToLed[25]('z', 0);

  colors[0] = white;

  colors[1] = red;

  colors[2] = green;

  colors[3] = blue;

  colors[4] = off;

  reset();

  abcs();

}

void loop() {

  type("My world would be upsidedown if i went to homecoming without you");
  delay(3000);
  type("andificant");
  delay(100);
  jog();

}

void beforejog() {
  FastLED.clear();
  leds[0] = CRGB (0, 255, 255); //aqua
  leds[10] = CRGB (0, 255, 255); //aqua
  leds[20] = CRGB (0, 255, 255); //aqua
  leds[30] = CRGB (0, 255, 255); //aqua
  leds[40] = CRGB (0, 255, 255); //aqua
  leds[1] = CRGB (153, 50, 204); //dark orchid
  leds[11] = CRGB (153, 50, 204); //dark orchid
  leds[21] = CRGB (153, 50, 204); //dark orchid
  leds[31] = CRGB (153, 50, 204); //dark orchid
  leds[41] = CRGB (153, 50, 204); //dark orchid
  leds[2] = CRGB (255, 255, 0); //yellow
  leds[12] = CRGB (255, 255, 0); //yellow
  leds[22] = CRGB (255, 255, 0); //yellow
  leds[32] = CRGB (255, 255, 0); //yellow
  leds[42] = CRGB (255, 255, 0); //yellow
  leds[3] = CRGB (0, 255, 127); //spring green
  leds[13] = CRGB (0, 255, 127); //spring green
  leds[23] = CRGB (0, 255, 127); //spring green
  leds[33] = CRGB (0, 255, 127); //spring green
  leds[43] = CRGB (0, 255, 127); //spring green
  leds[4] = CRGB (255, 165, 0); //orange
  leds[14] = CRGB (255, 165, 0); //orange
  leds[24] = CRGB (255, 165, 0); //orange
  leds[34] = CRGB (255, 165, 0); //orange
  leds[44] = CRGB (255, 165, 0); //orange
  leds[5] = CRGB (65, 105, 255); //royal blue
  leds[15] = CRGB (65, 105, 255); //royal blue
  leds[25] = CRGB (65, 105, 255); //royal blue
  leds[35] = CRGB (65, 105, 255); //royal blue
  leds[45] = CRGB (65, 105, 255); //royal blue
  leds[6] = CRGB (76, 0, 153); //dark purple
  leds[16] = CRGB (76, 0, 153); //dark purple
  leds[26] = CRGB (76, 0, 153); //dark purple
  leds[36] = CRGB (76, 0, 153); //dark purple
  leds[46] = CRGB (76, 0, 153); //dark purple
  leds[7] = CRGB (255, 105, 180); //hot pink
  leds[17] = CRGB (255, 105, 180); //hot pink
  leds[27] = CRGB (255, 105, 180); //hot pink
  leds[37] = CRGB (255, 105, 180); //hot pink
  leds[47] = CRGB (255, 105, 180); //hot pink
  leds[8] = CRGB (0, 128, 0); //dark green
  leds[18] = CRGB (0, 128, 0); //dark green
  leds[28] = CRGB (0, 128, 0); //dark green
  leds[38] = CRGB (0, 128, 0); //dark green
  leds[48] = CRGB (0, 128, 0); //dark green
  leds[9] = CRGB (255, 0, 0); //red
  leds[19] = CRGB (255, 0, 0); //red
  leds[29] = CRGB (255, 0, 0); //red
  leds[39] = CRGB (255, 0, 0); //red
  leds[49] = CRGB (255, 0, 0); //red
  FastLED.show();
  delay(50);
  FastLED.clear();
}

void jog() {
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  leds[31] = CRGB (255, 0, 0);
  FastLED.show();
  delay(2000);
  FastLED.clear();
  leds[11] = CRGB (255, 0, 0);
  FastLED.show();
  delay(2000);
  FastLED.clear();
  leds[24] = CRGB (255, 0, 0);
  FastLED.show();
  delay(2000);
  FastLED.clear();
}

void abcs() {

  for (int i = 0; i < 25; i++) {

    int t = myleds[i];

    leds[t] = white;

    FastLED.show();

    delay(250);

  }

  delay(10);

}

CRGB randomColor() {

  int t = random(4);

  return colors[t];

}

void reset() {

  for (int x = 0; x < NUM_LEDS; x++) {

    leds[x] = off;

  }

  FastLED.show();

  last_letter = 0;

}

void displayLetter(char letter) {

  if (isWhitespace(letter)) {

    last_letter = 0;

    delay(2000);

  }

  int lednum = charToLed.getValueOf(letter);

  if (lednum >= 0 && lednum <= 50) {

    if (last_letter == lednum) {

      delay(2000);
    }

    leds[lednum] = white;

    FastLED.show();

    last_letter = lednum;

    delay(2000);

    leds[lednum] = off;

    FastLED.show();

  }

}

void type(String message) {

  reset();

  message.toLowerCase();

  for (int i = 0; i < message.length(); i++) {

    displayLetter(message[i]);

  }

  reset();

}
void BLACKOUT() {
  int r = 0;
  int b = 0;
  int g = 0;

  for (int x = 0; x < NUM_LEDS; x++) {
    leds[x] = CRGB(r, g, b);
  }

  FastLED.show();
  delay(100);

}

Any help is appreciated. thanks.

user10394: This will not fix your problem!
You said you were inexperienced, so I have taken you code and with no knowledge of what it does (that mean I may have made mistakes) I have refactored it slightly.
#include <FastLED.h>

#define DATA_PIN (6) //this is the data pin connected to the LED strip. If using WS2801 you also need a clock pin
#define NUM_LEDS (50) //change this for the number of LEDs in the strip
#define COLOR_ORDER RGB
#define HASH_SIZE (28)

CRGB Leds[NUM_LEDS];

int last_letter = 0;

enum ColourNames {White, Red, Green, Blue, Off};
const CRGB Colours[] = { CRGB(255, 255, 255), CRGB(255, 0, 0), CRGB(0, 255, 0), CRGB(0, 0, 255), CRGB(0, 0, 0) };

struct LED
{
    int myled;
    int led;
    char letter;
    LED(const int& m = 0, const int& l = 0, const char& let = 0)
        : myled(m)
        , led(l)
        , letter(let)
    {}
};
LED LedData[HASH_SIZE];

void setup() 
{
    FastLED.addLeds<WS2811, DATA_PIN, COLOR_ORDER>(Leds, NUM_LEDS); //setting up the FastLED
    randomSeed(analogRead(0)); //seeding my random numbers to make it more random.

    LedData[ 0] = LED(47, 47, 'a');
    LedData[ 1] = LED(45, 45, 'b');
    LedData[ 2] = LED(43, 43, 'c');
    LedData[ 3] = LED(42, 42, 'd');
    LedData[ 4] = LED(40, 40, 'e');
    LedData[ 5] = LED(38, 38, 'f');
    LedData[ 6] = LED(37, 37, 'g');
    LedData[ 7] = LED(34, 34, 'h');
    LedData[ 8] = LED(32, 32, 'i');
    LedData[ 9] = LED(16, 16, 'j');
    LedData[10] = LED(18, 18, 'k');
    LedData[11] = LED(20, 20, 'l');
    LedData[12] = LED(22, 22, 'm');
    LedData[13] = LED(24, 24, 'n');
    LedData[14] = LED(26, 26, 'o');
    LedData[15] = LED(28, 28, 'p');
    LedData[16] = LED(29, 29, 'q');
    LedData[17] = LED(31, 31, 'r');
    LedData[18] = LED(15, 15, 's');
    LedData[19] = LED(13, 13, 't');
    LedData[20] = LED(11, 11, 'u');
    LedData[21] = LED( 9,  9, 'v');
    LedData[22] = LED( 7,  7, 'w');
    LedData[23] = LED( 4,  4, 'x');
    LedData[24] = LED( 2,  2, 'y');
    LedData[25] = LED( 0,  0, 'z');
    LedData[26] = LED();
    LedData[25] = LED();

    reset();
    abcs();
}

void loop() 
{
    type("My world would be upsidedown if i went to homecoming without you");
    delay(3000);
    type("andificant");
    delay(100);
    jog();
}

void beforejog() 
{
    static const int MaxColours = 10;
    const CRGB colours[MaxColours] =
    {
          CRGB(0, 255, 255)         //aqua
        , CRGB(153, 50, 204)        //dark orchid
        , CRGB(255, 255, 0)         //yellow
        , CRGB(0, 255, 127)         //spring green
        , CRGB(255, 165, 0)         //orange
        , CRGB(65, 105, 255)        //royal blue
        , CRGB(76, 0, 153)          //dark purple
        , CRGB(255, 105, 180)       //hot pink
        , CRGB(0, 128, 0)           //dark green
        , CRGB(255, 0, 0)           //red
    };

    FastLED.clear();
    for (int col = 0; col < MaxColours; ++col)
    {
        for (int r = col; r < NUM_LEDS; r += MaxColours)
        {
            Leds[r] = colours[col];
        }
    }

    FastLED.show();
    delay(50);
    FastLED.clear();
}

void jog() 
{
    for (int l = 0; l < 7; ++l)
    {
        beforejog();
        delay(100);
        Blackout(); 
        delay(100);
    }

    static const MaxLights = 3;
    const int lights[MaxLights] = { 31, 11, 24 };
    for (int l = 0; l < MaxLights; ++l)
    {
        Leds[lights[l]] = Colours[Red];
        FastLED.show();
        delay(2000);
        FastLED.clear();
    }
}

void abcs() 
{
    for (int i = 0; i < 25; i++) 
    {
        Leds[LedData[i].myled] = Colours[White];
        FastLED.show();
        delay(250);
    }
    delay(10);
}

CRGB randomColor() 
{
    const int t = random(4);
    return Colours[t];
}

void reset() 
{
    Blackout();
    last_letter = 0;
}

void displayLetter(char letter) 
{
    if (isWhitespace(letter)) 
    {
        last_letter = 0;
        delay(2000);
    }
    const int lednum = charToLed.getValueOf(letter);
    if (lednum >= 0 && lednum <= 50) 
    {
        if (last_letter == lednum) 
        {
            delay(2000);
        }
        Leds[lednum] = Colours[White];
        FastLED.show();
        last_letter = lednum;
        delay(2000);
        Leds[lednum] = Colours[Off];
        FastLED.show();
    }
}

void type(String message) 
{
    reset();
    message.toLowerCase();
    for (int i = 0; i < message.length(); i++) 
    {
        displayLetter(message[i]);
    }
    reset();
}

void Blackout() 
{
    for (int x = 0; x < NUM_LEDS; x++) 
    {
        Leds[x] = Colours[Off];
    }
    FastLED.show();
}

What I have tried to do is group similar variables into arrays (Colour).  I have also created a structure to hold your LED data, it makes it easier to read if it all appears on a single line.  I have added loops to some of the functions to reduce the line count.  And if you aren't changing a variable make it const, it will make no difference to the compiler, but its easier to read and understand.
I haven't compiled this, so there is probably a howler in there, but hopefully it will give you a different perspective on your code and a different (not better) way of doing things.  Oh and it should still have the problem you are asking about, which I think is you need to add an else into that function.

38292: <p>im currently working on a stranger things letter board with an arduino and ws2811 leds and im having an issue where ever there is a space, the previous letter will be displayed. Ive tried going in and finding where it makes this duplicate, but i am rather inexperienced. Heres my code:</p>

<pre><code>#include &lt;FastLED.h&gt;

#include &lt;HashMap.h&gt;

#define DATA_PIN 6 //this is the data pin connected to the LED strip. If using WS2801 you also need a clock pin

#define NUM_LEDS 50 //change this for the number of LEDs in the strip

#define COLOR_ORDER RGB

CRGB leds[NUM_LEDS];

CRGB colors[5];

int myleds[25];

int last_letter = 0;

CRGB white = CRGB(255, 255, 255);

CRGB red = CRGB (255, 0, 0);

CRGB green = CRGB (0, 255, 0);

CRGB blue = CRGB(0, 0, 255);

CRGB off = CRGB(0, 0, 0);

const byte HASH_SIZE = 28;

HashType&lt;char, int&gt; hashRawArray[HASH_SIZE];

HashMap&lt;char, int&gt; charToLed = HashMap&lt;char, int&gt;( hashRawArray , HASH_SIZE );

void setup() {

  FastLED.addLeds&lt;WS2811, DATA_PIN, COLOR_ORDER&gt;(leds, NUM_LEDS); //setting up the FastLED

  randomSeed(analogRead(0)); //seeding my random numbers to make it more random.

  myleds[0] = 47;//A

  charToLed[0]('a', 47);

  myleds[1] = 45;//B

  charToLed[1]('b', 45);

  myleds[2] = 43;//C

  charToLed[2]('c', 43);

  myleds[3] = 42;//D

  charToLed[3]('d', 42);

  myleds[4] = 40;//E

  charToLed[4]('e', 40);

  myleds[5] = 38;//F

  charToLed[5]('f', 38);

  myleds[6] = 37;//G

  charToLed[6]('g', 37);

  myleds[7] = 34;//H

  charToLed[7]('h', 34);

  myleds[8] = 32;//I

  charToLed[8]('i', 32);

  myleds[9] = 16;//J

  charToLed[9]('j', 16);

  myleds[10] = 18;//K

  charToLed[10]('k', 18);

  myleds[11] = 20;//L

  charToLed[11]('l', 20);

  myleds[12] = 22;//M

  charToLed[12]('m', 22);

  myleds[13] = 24;//N

  charToLed[13]('n', 24);

  myleds[14] = 26;//O

  charToLed[14]('o', 26);

  myleds[15] = 28;//P

  charToLed[15]('p', 28);

  myleds[16] = 29;//Q

  charToLed[16]('q', 29);

  myleds[17] = 31;//R

  charToLed[17]('r', 31);

  myleds[18] = 15;//S

  charToLed[18]('s', 15);

  myleds[19] = 13;//T

  charToLed[19]('t', 13);

  myleds[20] = 11;//U

  charToLed[20]('u', 11);

  myleds[21] = 9;//V

  charToLed[21]('v', 9);

  myleds[22] = 7;//W

  charToLed[22]('w', 7);

  myleds[23] = 4;//X

  charToLed[23]('x', 4);

  myleds[24] = 2;//Y

  charToLed[24]('y', 2);

  myleds[25] = 0;//Z

  charToLed[25]('z', 0);

  colors[0] = white;

  colors[1] = red;

  colors[2] = green;

  colors[3] = blue;

  colors[4] = off;

  reset();

  abcs();

}

void loop() {

  type("My world would be upsidedown if i went to homecoming without you");
  delay(3000);
  type("andificant");
  delay(100);
  jog();

}

void beforejog() {
  FastLED.clear();
  leds[0] = CRGB (0, 255, 255); //aqua
  leds[10] = CRGB (0, 255, 255); //aqua
  leds[20] = CRGB (0, 255, 255); //aqua
  leds[30] = CRGB (0, 255, 255); //aqua
  leds[40] = CRGB (0, 255, 255); //aqua
  leds[1] = CRGB (153, 50, 204); //dark orchid
  leds[11] = CRGB (153, 50, 204); //dark orchid
  leds[21] = CRGB (153, 50, 204); //dark orchid
  leds[31] = CRGB (153, 50, 204); //dark orchid
  leds[41] = CRGB (153, 50, 204); //dark orchid
  leds[2] = CRGB (255, 255, 0); //yellow
  leds[12] = CRGB (255, 255, 0); //yellow
  leds[22] = CRGB (255, 255, 0); //yellow
  leds[32] = CRGB (255, 255, 0); //yellow
  leds[42] = CRGB (255, 255, 0); //yellow
  leds[3] = CRGB (0, 255, 127); //spring green
  leds[13] = CRGB (0, 255, 127); //spring green
  leds[23] = CRGB (0, 255, 127); //spring green
  leds[33] = CRGB (0, 255, 127); //spring green
  leds[43] = CRGB (0, 255, 127); //spring green
  leds[4] = CRGB (255, 165, 0); //orange
  leds[14] = CRGB (255, 165, 0); //orange
  leds[24] = CRGB (255, 165, 0); //orange
  leds[34] = CRGB (255, 165, 0); //orange
  leds[44] = CRGB (255, 165, 0); //orange
  leds[5] = CRGB (65, 105, 255); //royal blue
  leds[15] = CRGB (65, 105, 255); //royal blue
  leds[25] = CRGB (65, 105, 255); //royal blue
  leds[35] = CRGB (65, 105, 255); //royal blue
  leds[45] = CRGB (65, 105, 255); //royal blue
  leds[6] = CRGB (76, 0, 153); //dark purple
  leds[16] = CRGB (76, 0, 153); //dark purple
  leds[26] = CRGB (76, 0, 153); //dark purple
  leds[36] = CRGB (76, 0, 153); //dark purple
  leds[46] = CRGB (76, 0, 153); //dark purple
  leds[7] = CRGB (255, 105, 180); //hot pink
  leds[17] = CRGB (255, 105, 180); //hot pink
  leds[27] = CRGB (255, 105, 180); //hot pink
  leds[37] = CRGB (255, 105, 180); //hot pink
  leds[47] = CRGB (255, 105, 180); //hot pink
  leds[8] = CRGB (0, 128, 0); //dark green
  leds[18] = CRGB (0, 128, 0); //dark green
  leds[28] = CRGB (0, 128, 0); //dark green
  leds[38] = CRGB (0, 128, 0); //dark green
  leds[48] = CRGB (0, 128, 0); //dark green
  leds[9] = CRGB (255, 0, 0); //red
  leds[19] = CRGB (255, 0, 0); //red
  leds[29] = CRGB (255, 0, 0); //red
  leds[39] = CRGB (255, 0, 0); //red
  leds[49] = CRGB (255, 0, 0); //red
  FastLED.show();
  delay(50);
  FastLED.clear();
}

void jog() {
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  beforejog();
  delay(100);
  BLACKOUT();
  leds[31] = CRGB (255, 0, 0);
  FastLED.show();
  delay(2000);
  FastLED.clear();
  leds[11] = CRGB (255, 0, 0);
  FastLED.show();
  delay(2000);
  FastLED.clear();
  leds[24] = CRGB (255, 0, 0);
  FastLED.show();
  delay(2000);
  FastLED.clear();
}

void abcs() {

  for (int i = 0; i &lt; 25; i++) {

    int t = myleds[i];

    leds[t] = white;

    FastLED.show();

    delay(250);

  }

  delay(10);

}

CRGB randomColor() {

  int t = random(4);

  return colors[t];

}

void reset() {

  for (int x = 0; x &lt; NUM_LEDS; x++) {

    leds[x] = off;

  }

  FastLED.show();

  last_letter = 0;

}

void displayLetter(char letter) {

  if (isWhitespace(letter)) {

    last_letter = 0;

    delay(2000);

  }

  int lednum = charToLed.getValueOf(letter);

  if (lednum &gt;= 0 &amp;&amp; lednum &lt;= 50) {

    if (last_letter == lednum) {

      delay(2000);
    }

    leds[lednum] = white;

    FastLED.show();

    last_letter = lednum;

    delay(2000);

    leds[lednum] = off;

    FastLED.show();

  }

}

void type(String message) {

  reset();

  message.toLowerCase();

  for (int i = 0; i &lt; message.length(); i++) {

    displayLetter(message[i]);

  }

  reset();

}
void BLACKOUT() {
  int r = 0;
  int b = 0;
  int g = 0;

  for (int x = 0; x &lt; NUM_LEDS; x++) {
    leds[x] = CRGB(r, g, b);
  }

  FastLED.show();
  delay(100);

}
</code></pre>

<p>Any help is appreciated. thanks.</p>
 10394: <p>This will not fix your problem!</p>

<p>You said you were inexperienced, so I have taken you code and with no knowledge of what it does (that mean I may have made mistakes) I have refactored it slightly.</p>

<pre><code>#include &lt;FastLED.h&gt;

#define DATA_PIN (6) //this is the data pin connected to the LED strip. If using WS2801 you also need a clock pin
#define NUM_LEDS (50) //change this for the number of LEDs in the strip
#define COLOR_ORDER RGB
#define HASH_SIZE (28)

CRGB Leds[NUM_LEDS];

int last_letter = 0;

enum ColourNames {White, Red, Green, Blue, Off};
const CRGB Colours[] = { CRGB(255, 255, 255), CRGB(255, 0, 0), CRGB(0, 255, 0), CRGB(0, 0, 255), CRGB(0, 0, 0) };

struct LED
{
    int myled;
    int led;
    char letter;
    LED(const int&amp; m = 0, const int&amp; l = 0, const char&amp; let = 0)
        : myled(m)
        , led(l)
        , letter(let)
    {}
};
LED LedData[HASH_SIZE];

void setup() 
{
    FastLED.addLeds&lt;WS2811, DATA_PIN, COLOR_ORDER&gt;(Leds, NUM_LEDS); //setting up the FastLED
    randomSeed(analogRead(0)); //seeding my random numbers to make it more random.

    LedData[ 0] = LED(47, 47, 'a');
    LedData[ 1] = LED(45, 45, 'b');
    LedData[ 2] = LED(43, 43, 'c');
    LedData[ 3] = LED(42, 42, 'd');
    LedData[ 4] = LED(40, 40, 'e');
    LedData[ 5] = LED(38, 38, 'f');
    LedData[ 6] = LED(37, 37, 'g');
    LedData[ 7] = LED(34, 34, 'h');
    LedData[ 8] = LED(32, 32, 'i');
    LedData[ 9] = LED(16, 16, 'j');
    LedData[10] = LED(18, 18, 'k');
    LedData[11] = LED(20, 20, 'l');
    LedData[12] = LED(22, 22, 'm');
    LedData[13] = LED(24, 24, 'n');
    LedData[14] = LED(26, 26, 'o');
    LedData[15] = LED(28, 28, 'p');
    LedData[16] = LED(29, 29, 'q');
    LedData[17] = LED(31, 31, 'r');
    LedData[18] = LED(15, 15, 's');
    LedData[19] = LED(13, 13, 't');
    LedData[20] = LED(11, 11, 'u');
    LedData[21] = LED( 9,  9, 'v');
    LedData[22] = LED( 7,  7, 'w');
    LedData[23] = LED( 4,  4, 'x');
    LedData[24] = LED( 2,  2, 'y');
    LedData[25] = LED( 0,  0, 'z');
    LedData[26] = LED();
    LedData[25] = LED();

    reset();
    abcs();
}

void loop() 
{
    type("My world would be upsidedown if i went to homecoming without you");
    delay(3000);
    type("andificant");
    delay(100);
    jog();
}

void beforejog() 
{
    static const int MaxColours = 10;
    const CRGB colours[MaxColours] =
    {
          CRGB(0, 255, 255)         //aqua
        , CRGB(153, 50, 204)        //dark orchid
        , CRGB(255, 255, 0)         //yellow
        , CRGB(0, 255, 127)         //spring green
        , CRGB(255, 165, 0)         //orange
        , CRGB(65, 105, 255)        //royal blue
        , CRGB(76, 0, 153)          //dark purple
        , CRGB(255, 105, 180)       //hot pink
        , CRGB(0, 128, 0)           //dark green
        , CRGB(255, 0, 0)           //red
    };

    FastLED.clear();
    for (int col = 0; col &lt; MaxColours; ++col)
    {
        for (int r = col; r &lt; NUM_LEDS; r += MaxColours)
        {
            Leds[r] = colours[col];
        }
    }

    FastLED.show();
    delay(50);
    FastLED.clear();
}

void jog() 
{
    for (int l = 0; l &lt; 7; ++l)
    {
        beforejog();
        delay(100);
        Blackout(); 
        delay(100);
    }

    static const MaxLights = 3;
    const int lights[MaxLights] = { 31, 11, 24 };
    for (int l = 0; l &lt; MaxLights; ++l)
    {
        Leds[lights[l]] = Colours[Red];
        FastLED.show();
        delay(2000);
        FastLED.clear();
    }
}

void abcs() 
{
    for (int i = 0; i &lt; 25; i++) 
    {
        Leds[LedData[i].myled] = Colours[White];
        FastLED.show();
        delay(250);
    }
    delay(10);
}

CRGB randomColor() 
{
    const int t = random(4);
    return Colours[t];
}

void reset() 
{
    Blackout();
    last_letter = 0;
}

void displayLetter(char letter) 
{
    if (isWhitespace(letter)) 
    {
        last_letter = 0;
        delay(2000);
    }
    const int lednum = charToLed.getValueOf(letter);
    if (lednum &gt;= 0 &amp;&amp; lednum &lt;= 50) 
    {
        if (last_letter == lednum) 
        {
            delay(2000);
        }
        Leds[lednum] = Colours[White];
        FastLED.show();
        last_letter = lednum;
        delay(2000);
        Leds[lednum] = Colours[Off];
        FastLED.show();
    }
}

void type(String message) 
{
    reset();
    message.toLowerCase();
    for (int i = 0; i &lt; message.length(); i++) 
    {
        displayLetter(message[i]);
    }
    reset();
}

void Blackout() 
{
    for (int x = 0; x &lt; NUM_LEDS; x++) 
    {
        Leds[x] = Colours[Off];
    }
    FastLED.show();
}
</code></pre>

<p>What I have tried to do is group similar variables into arrays (<code>Colour</code>).  I have also created a structure to hold your LED data, it makes it easier to read if it all appears on a single line.  I have added loops to some of the functions to reduce the line count.  And if you aren't changing a variable make it const, it will make no difference to the compiler, but its easier to read and understand.</p>

<p>I haven't compiled this, so there is probably a howler in there, but hopefully it will give you a different perspective on your code and a different (not better) way of doing things.  Oh and it should still have the problem you are asking about, which I think is you need to add an else into that function.</p>
