conversion code fastled/adafruit neopixel

Bonjour, avant tout, merci a tout le monde pour toutes ces informations apportées sur ce forum. c'est une vraie mine d'or.

Je vous présente mon souci.

J'aimerais savoir si il est possible de transformer mon code créé a partir de la bibliotheque fastled, pour qu'il fonctionne sur la bibliotheque adafruit neopixel ?

Je dois faire cette transformation car j'ajoute a mon projet, des bandes leds SK6812 RGBW.
Celle ci ne sont pas prise en charge par la bibliotheque fastled.

Pensez vous que cela soit faisable sans trop s'arracher les cheveux ?

P.S : Je suis un novice de premiere classe dans la programmation ( 4 mois d'expérience). Ne vous étonnez pas si vous voyez des choses incompréhensible.

voici mon code.

#include<FastLED.h>
#define NUM_LEDS_PER_STRIP 5
CRGB clignoGauche[NUM_LEDS_PER_STRIP];
CRGB clignoDroite[NUM_LEDS_PER_STRIP];
CRGB frein[NUM_LEDS_PER_STRIP];
CRGB marcheArriere[NUM_LEDS_PER_STRIP];
CRGB phares[NUM_LEDS_PER_STRIP];

boolean etatClignoGauche=0;
boolean etatClignoDroite=0;
boolean etatFrein=0;
boolean etatMarcheArriere=0;
boolean etatPhares=0;

int pinClignoGauche=2;
int pinClignoDroite=7;
int pinFrein=4;
int pinMarcheArriere=3;
int dernierEtat=0;
int ledEtat=0;
int pinPhares=8;

void setup() 
{
  
  pinMode(pinClignoGauche,INPUT);
  pinMode(pinClignoDroite,INPUT);
  pinMode(pinFrein,INPUT);
  pinMode(pinMarcheArriere,INPUT);
  pinMode(pinPhares,INPUT);
  
  LEDS.addLeds<NEOPIXEL, 5>(clignoGauche,NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip);
  LEDS.addLeds<NEOPIXEL, 6>(clignoDroite,NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip);
  LEDS.addLeds<NEOPIXEL, 9>(phares,NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip);
  LEDS.addLeds<NEOPIXEL, 10>(phares,NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip);
  LEDS.addLeds<NEOPIXEL, 12>(marcheArriere,NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip);
  LEDS.addLeds<NEOPIXEL, 13>(marcheArriere,NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip);
  LEDS.addLeds<NEOPIXEL, 11>(frein,NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip);
      for(int i=0; i<=4; i++)
          {
           phares[i]=CHSV(255,255,60);
           delay(100);
           FastLED.show();
          }
}

void loop() 
{
  etatClignoGauche=digitalRead(pinClignoGauche);                                            
  etatClignoDroite=digitalRead(pinClignoDroite);
  etatFrein=digitalRead(pinFrein);
  etatMarcheArriere=digitalRead(pinMarcheArriere);
  etatPhares=digitalRead(pinPhares);
    
  if(etatClignoGauche==1 && etatClignoDroite==0)
     {        
      codeClignoGauche();                                
     }
         
     
         if(etatClignoDroite==1 && etatClignoGauche==0)
           {  
              codeClignoDroite();
           }
           
             
                 if (etatClignoGauche==1 && etatClignoDroite==1)
                    { 
                       code_4_Clignotant();
                    }


                          if(etatMarcheArriere==1)
                             {
                                codeMarcheArriere();
                             }
                                 else
                                    {
                                       codeMarcheArriereEteint();
                                    }

                    
                      
                                       if(etatFrein==1)
                                         {
                                            codeFrein();
                                         } 
                                         
                                            else
                                               {
                                                codeFreinEteint();
                                               }
                                 
}          
void codeClignoGauche()
{
  for(int i=0; i<=4; i++)                                     
     {                                                          
        clignoGauche[i]=CHSV(32,255,255);                                                                     
        FastLED.show();
        delay(30);                                           
     } 
delay(250);
        
            for(int i=0; i<=4; i++)
               {
                clignoGauche[i]=CHSV(32,255,0);
                delay(30);
                FastLED.show();
               }
delay(250);
}

void codeClignoDroite()
{   
            for(int i=0; i<=4; i++) 
               {                                                           
                 clignoDroite[i]=CHSV(32,255,255);                               
                 delay(30);                                                
                 FastLED.show();                                          
               }  
delay(250);
                 for(int i=0; i<=4; i++)                                    
                    {
                     clignoDroite[i]=CHSV(32,255,0);                                   
                     delay(30);                                              
                     FastLED.show();
                    }
delay(250);                                  
}

void code_4_Clignotant()
{
 
                  for(int i=0; i<=4; i++)
                     {
                        clignoGauche[i]=CHSV(32,255,255);
                        clignoDroite[i]=CHSV(32,255,255);
                        FastLED.show();
                        delay(30);
                      }
delay(250);
                         for(int i=0; i<=4; i++)
                            {
                               clignoGauche[i]=CHSV(32,255,0);
                               clignoDroite[i]=CHSV(32,255,0);
                               FastLED.show();
                               delay(30);
                            }      
delay(250);
}
 
void codeFrein()
{
  
             for(long j=0; j<=2; j++)
                {
                  frein[j] =CHSV(255,255,255);
                  FastLED.show();
                } 

  
  for(long i=0; i<=4; i++)
     {
         phares[i] == CHSV(255,255,0);
         phares[i+5] = CHSV(255,255,255);
         phares[i-0]= CHSV(255,255,0);
         frein[i] =CHSV(255,255,255);
         delay(20);
         FastLED.show();
     }
             
 }

void codeFreinEteint()
{
   
   for(int i=0; i<=4; i++)
      {
         phares[i] =CHSV(255,255,60);
         frein[i] =CHSV(255,255,0);
         FastLED.show();
      } 
}


void codeMarcheArriere()
{
    
    for(int i=0; i<=4; i++)
       {
           marcheArriere[i] =CRGB(128,128,128);
           FastLED.show();
       }      
}


void codeMarcheArriereEteint()
{
    for(int i=0; i<=4; i++)
         {
             marcheArriere[i] =CRGB(0,0,0);
             FastLED.show();
         }            
}

Bonjour,

Le bibliothèques fastled et adafruit neopixels ont des philosophies assez différentes (avec la première on écrit dans le pixels, dans la seconde il faut appeler une fonction).
Il faudra donc réécrire toutes des instructions de commande des leds, mais comme ton programme est assez simple, ça devrait être aussi assez simple.