first LED cosplay Project

Dear all,

I bought my arduino uno R3 and a WS2812b ledstrip for my first LED cosplay project.
I'm working on a Destiny 2 hunter and would love to make a Graviton Lance pulse rifle with LED in it.
see link for the gun

i have been doing a lot of coding with a friend together and we searched the internet to find some codes to recreat the effect of the pusle rifle. this is the point we got stuck, we found the Trail coding or running light coding but we only manage to get 1 light at the time in a run, while the gun shoots like 3 lights in 1 run.
is there anyone who might can help me with the coding of this project? ofcourse i would not use 3 sepparated LED strips for this project because it would cost me a fortune and seeing al kind of projects i'm almost sure that this might be an easy project for some of you guys.

It is helpful to post the code you have. Mark the sections for what it does and then mention what you would like for it to do instead. Then People can comment on it and help you figure it out.

this is the code i have now.

#include "FastLED.h"

// How many leds in your strip?
#define NUM_LEDS 60
//lengthe of trail
#define TRAIL 200

#define DATA_PIN 6

// Define the array of leds
CRGB leds[60];

void setup() {

FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);

}

void loop() {

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

leds = CRGB( 80, 0, 130);

  • FastLED.show();*

  • delay(15); //speed of trail*

  • fadeall();*

  • }//for*

  • } //loop*

// fades the LED's behind the leading LED
*void fadeall() { *

  • for(int i = 0; i < 60; i++) { *
    _ leds*.nscale8(TRAIL); } _
    _
    }_
    _
    }*_

Please read the forum guide in the sticky post, understand and remember all the tips and rules, then modify your post above and put in the code tags. Because you did not use code tags, the forum has corrupted your code, look at this line:

leds = CRGB( 80,     0,          130);

Also modify your first post and make your pasted web address into a real link that can be clicked.

Don't bother with the link... it's an >18-minute video, apparently showcasing some game. I skipped a bit through it, having no idea what the OP is looking for.

Before posting the code:

  • do an autoformat (ctrl-T in the IDE)
  • remove all those unnecessary whitelines
    Those two actions make it much more readable.

VIDEO : from about 37 seconds to 1:140 seconds is the Graviton Lance. please verify that is all you are looking for.
the light chase bit.

are you saying that you have one LED that lights, the next goes on and the first goes out, and the 'chase' goes from one end but only 1 led is ever lit at a time?

WELCOME to the Forum!

as was noted there are a few things that this web forum offers to make things easier

if you look at the sticky post on the top of each forum HOW TO USE THIS FORUM, you will find lots of tips.

one of the problems is that our program codes mess with the browers and you get funny emgoies when you expect to have code.

please look at #7, and then come back to your post and add the [ with the word code and then the ] at the end.
ditto at the end of your code, but use /code

you can find the edit or modify, at the bottom right of your post.