Error 6:10: fatal error: FastLED.h: No such file or directory exit status 1

Hey,

I´m tring to code a “TikTacToe” Game but I get a silly error and don´t know how to fix it.

Code:

#include "Keypad.h"
#include "FastLED.h"

#define LED_PIN 5
#define NUM_LEDS 9
#define LED_TYPE Neopixel
#define COLOR_ORDER GRB
#define BRIGHTNESS  250
CRGB leds[NUM_LEDS];

int player=1;
int n,i,e=0;j=0;
char a[9]={´1´,´2´,´3´,´4´,´5´,´6´,´7´,´8´,´9´};
char key;
int w=0;

const byte Rows = 3; //drei Routen
const byte COLS = 3; //drei Spalten
//Definieren Sie die Symbole auf den Tasten
char hexalKeys[ROWS][COLS] = {
  {´1´,´2´,´3´,´A´},
  {´4´,´5´,´6´,´B´},
  {´7´,´8´,´9´,´C´}
};
byte rowPins[ROWS] = {A1,A2,A3}; //Anschluss an die Reihenbelegung des Tastenfelds
byte colPins[COLS] = {A4,2,3}; //Anschluss an die Spaltenbelegung des Tastenfelds
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);

void setup(){
  Serial.begin(9600);
  LEDS:addLEDS<LED_TYPE; LED_PIN; COLOR_Order>leds, NUM_LEDS;
  FatsLED.setBrightness(Helligkeit);
  for(int m=0;m<3;m++)
  {
        leds[0].setRGB(0, 204, 255);
        leds[1].setRGB(0, 204, 255);
        leds[2].setRGB(0, 204, 255);
        leds[3].setRGB(0, 204, 255);
        leds[4].setRGB(0, 204, 255);
        leds[5].setRGB(0, 204, 255);
        leds[6].setRGB(0, 204, 255);
        leds[7].setRGB(0, 204, 255);
        leds[8].setRGB(0, 204, 255);
        leds[9].setRGB(0, 204, 255);
        FastLED.show();
        leds[0].setRGB(255, 0, 225);
        leds[1].setRGB(255, 0, 225);
        leds[2].setRGB(255, 0, 225);
        leds[3].setRGB(255, 0, 225);
        leds[4].setRGB(255, 0, 225);
        leds[5].setRGB(255, 0, 225);
        leds[6].setRGB(255, 0, 225);
        leds[7].setRGB(255, 0, 225);
        leds[8].setRGB(255, 0, 225);
        leds[9].setRGB(255, 0, 225);
        FastLED.show();
        delay(500);
  }
        FastLED.clear();
        FastLED.show();
}

void loop()
{
  key = customKeypad.getKey();
  if (key && player==1)
  {
    Serial.println("\nP1");
    Serial.println(key);
    n=number(key);
    Serial.println(n);
    leds[n].setRGB(0, 204, 255);
    FastLED.show();
    a[n]=´X´;
    Serial.println(a[n]);
    w=check(a,n);
    if w==1
    {
      Serial.println("Spieler 1 gewinnt!");
      while(1)
      {
        leds[0].setRGB(0, 204, 255);
        leds[1].setRGB(0, 204, 255);
        leds[2].setRGB(0, 204, 255);
        leds[3].setRGB(0, 204, 255);
        leds[4].setRGB(0, 204, 255);
        leds[5].setRGB(0, 204, 255);
        leds[6].setRGB(0, 204, 255);
        leds[7].setRGB(0, 204, 255);
        leds[8].setRGB(0, 204, 255);
        leds[9].setRGB(0, 204, 255);
        FastLED.show();
        delay(500);
        FastLED.clear();
        FastLED.show();
        delay(500);
    }
  }
    player++;
    delay(1000);
  }
  delay(20);
  key = customKeypad.getKey();
  if (key && player==2)
  {
    Serial.println("\np2")
    Serial.println(key);
    n=number(key);
    Serial.println(n);
    leds[n].setRGB(0, 204, 255);
    FastLED.show();
    a[n]=´X´;
    Serial.println(a[n]);
    w=check(a,n);
    if (w==2)
    {
      Serialprintln("Spieler 2 gewinnt!");
      while(1)
      {
        leds(0).setRGB(255, 0, 225);
        leds(1).setRGB(255, 0, 255);
        leds(2).setRGB(255, 0, 255);
        leds(3).setRGB(255, 0, 255);
        leds(4).setRGB(255, 0, 255);
        leds(5).setRGB(255, 0, 255);
        leds(6).setRGB(255, 0, 255);
        leds(7).setRGB(255, 0, 255);
        leds(8).setRGB(255, 0, 255);
        leds(9).setRGB(255, 0, 255);
         FastLED.show();
        delay(500);
        FastLED.clear();
        FastLED.show();
        delay(500);

        
      }
      }
      e++;
    player--;
     delay(1000);
    }
    if(e==8)
    {
      Serial.println("Unentschieden");
      while(1)
      {
        leds[0].setRGB(255, 0, 0);
        leds[1].setRGB(255, 0, 0);
        leds[2].setRGB(255, 0, 0);
        leds[3].setRGB(255, 0, 0);
        leds[4].setRGB(255, 0, 0);
        leds[5].setRGB(255, 0, 0);
        leds[6].setRGB(255, 0, 0);
        leds[7].setRGB(255, 0, 0);
        leds[8].setRGB(255, 0, 0);
        leds[9].setRGB(255, 0, 0);;
        FastLED.show();
        delay(1000);
        FastLED.clear();
        FastLED.show();
        delay(500);
    }
    }
    delay(20);
}

int number(char keyn)
{
  if (keyn == '1´)
      return ;
  if (keyn == '2´)
      return 2;
  if (keyn == '3´)
      return 3;
  if(key == 'A')
      return 4;
  if (keyn == '4´)
      return 5;
  if (keyn == '5´)
      return 6;
  if (keyn == '6´)
      return 7;
  if(key == 'B')
      return 8;
  if (keyn == '7´)
      return 9;
  if (keyn == '8´)
      return 10;
  if (keyn == '9´)
      return 11;
  if (key == 'C')
    return 12;
}
     
int check(char a[9], int n)
{
  
  if(a[1]==´X´ && a[2]==´X´ && a[3]==´X´) //Alle Kombinationen um zu gewinnen
     return 1;
  if(a[1]==´0´ && a[2]==´0´ && a[3]==´0´) //Alle Kombinationen um zu gewinnen
     return 2;
  if(a[1]==´X´ && a[4]==´X´ && a[7]==´X´) //Alle Kombinationen um zu gewinnen
     return 1;
  if(a[1]==´0´ && a[4]==´0´ && a[7]==´0´) //Alle Kombinationen um zu gewinnen
     return 2;
  if(a[1]==´X´ && a[5]==´X´ && a[9]==´X´) //Alle Kombinationen um zu gewinnen 
     return 1;
  if(a[1]==´0´ && a[5]==´0´ && a[9]==´0´) //Alle Kombinationen um zu gewinnen 
     return 2;
  if(a[2]==´X´ && a[5]==´X´ && a[8]==´X´) //Alle Kombinationen um zu gewinnen
     return 1;
  if(a[2]==´0´ && a[5]==´0´ && a[8]==´0´) //Alle Kombinationen um zu gewinnen
     return 2;
  if(a[3]==´X´ && a[6]==´X´ && a[9]==´X´) //Alle Kombinationen um zu gewinnen
     return 1;
  if(a[3]==´0´ && a[6]==´0´ && a[9]==´0´) //Alle Kombinationen um zu gewinnen
     return 2;
  if(a[3]==´X´ && a[5]==´X´ && a[7]==´X´) //Alle Kombinationen um zu gewinnen
     return 1;
  if(a[3]==´0´ && a[5]==´0´ && a[7]==´0´) //Alle Kombinationen um zu gewinnen 
     return 2;
  if(a[4]==´X´ && a[5]==´X´ && a[6]==´X´) //Alle Kombinationen um zu gewinnen
     return 1;
  if(a[4]==´0´ && a[5]==´0´ && a[6]==´0´) //Alle Kombinationen um zu gewinnen
     return 2;
  if(a[7]==´X´ && a[8]==´X´ && a[9]==´X´) //Alle Kombinationen um zu gewinnen  
     return 1;
  if(a[7]==´0´ && a[8]==´0´ && a[9]==´0´) //Alle Kombinationen um zu gewinnen
     return 2;
}




     







        
        
        

  
        
               
        
    
        

  
    

ERROR:

6:10: fatal error: FastLED.h: No such file or directory

 exit status 1

Can somebody help me?

Greetings
Nico

it means you did not install the FastLED library

Cause of Corona, we´re using in school a website called “tinkercad” how do you install it there?

it had been requested by some schools, not sure it was done…

I don’t think you can add it yourself unfortunately.

looks like Adafruit_NeoPixel library is supported though so you should use that

Adafruit has a tutorial on line for their Neopixels and library

1 Like

Okay, I´m trying it with Adafruit.

Thanks for your help, Have a nice Day :pray:

Greetings

have fun despite Covid time !

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.