Ace Frehley Flasher

Hi Im buliding a guitar that flashes. I want to send info to 7 groups of leds lit upp after each other with bright white light. See link below.

https://www.youtube.com/watch?v=0oKuKlQANL4

I use Arduino Uno and neopixel led. 7 inputs and 7 ledstrips. I have tried with FastLED multiple controllers but its not working like I want. I have tried to rewrite the code but i suck. Can some one help me?

joda555

Its around 40-50 leds/group. Its driven with 5volts. From a 9volt battery.

If you want white lights, why use expensive RGB lights? If you want them in big groups, why use individually addressable LEDs? It would be MUCH cheaper, lower power, and probably brighter, to use simple white LED strips. NeoPixel strips with 60 LEDs per meter are $25/meter. White LED strips with 60 LEDs per meter are $12 for FIVE meters. For the price of 60 NeoPixels you can get 600 plain white. They would draw roughly 2 Amps instead of 18. A 3S Lithium Polymer battery (nominally 11.7V) should work for the 12V strips. You can get a 2000 mAh battery for under $20 and it would power 300 LEDs at full brightness for about an hour (longer if not all are lit all the time). An Arduino UNO or Nano or Mini could fade 6 groups up and down or turn about 20 groups on and off.

Ok nevermind the price or the power. I need help with the coding. To make 7 groups of ledstrips light up after each other in a loop. 7 strips from 7 inputs.

I need help with the coding

We can't see your code.

Sorry but Im new to this. I have no code. I have tried some fasLED but i dont know how to change it the right way.

Start with the [u]Blink LED Example[/u] and expand from there. If you can understand how that works, you should be able blink more than one LED in a sequence

(I'm pretty sure that's more than 7 addressable "channels")

You'll probably need to learn to use loops ([u]for-loops[/u], [u]while-loops[/u], and [u]do-while[/u] loops), and [u]if-statements[/u].

Conditional execution (if-statements, etc.) and loops (doing something over-and-over, usually with some variation until some condition is reached) are the most important concepts in programming.

byte PINS[7] = {2,3,4,5,6,7,8};
void setup() {
    for (int i=0; i<7; i++) {
        digitalWrite(PINS[i], LOW);
        pinMode(PINS[i], OUTPUT);
    }
}

void loop() {
    // Light each group in turn, about 1/4 second apart
    for (int i=0; i<7; i++) {
        digitalWrite(PINS[i], HIGH);
        delay(250); 
    }

    // Leave them all on for an additional 3/4 second
    delay(750);

    // Turn them all off
    for (int i=0; i<7; i++) {
        digitalWrite(PINS[i], LOW);
    }

    // Leave them off for 1/2 second
    delay(500);
}

Thank you. Its uploading fine but nothing happens.

joda555: I have tried some fasLED but i dont know how to change it the right way.

So, post that.

joda555: Thank you. Its uploading fine but nothing happens.

Maybe change the pin numbers to the ones that you're using.

ok this is the code im trying. A red led is wandering over the one strip to the other. I want it to light the whole strip instead of wandering. and in white :slight_smile:

#include “FastLED.h”
#define NUM_STRIPS 7
#define NUM_LEDS_PER_STRIP 10
CRGB leds[NUM_STRIPS][NUM_LEDS_PER_STRIP];

void setup() {
FastLED.addLeds<NEOPIXEL, 2>(leds[0], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 3>(leds[1], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 4>(leds[2], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 5>(leds[3], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 6>(leds[4], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 7>(leds[5], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 8>(leds[6], NUM_LEDS_PER_STRIP);

}

void loop() {
// This outer loop will go over each strip, one at a time
for(int x = 0; x < NUM_STRIPS; x++) {
// This inner loop will go over each led in the current strip, one at a time
for(int i = 0; i < NUM_LEDS_PER_STRIP; i++) {
leds = CRGB::Red;

  • FastLED.show();*
    _ leds = CRGB::Black;_
    * delay(100);*
    * }*
    * }*
    }

And now with code tags, please.

I removed the delay and changed to white so now its working but its fast as hell. How do I control the speed?

Hi,

Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

We need to see how you have connected everything and your input and output connections.

Thanks.. Tom..... :)

ok sorry :slight_smile:

#include "FastLED.h"
#define NUM_STRIPS 7
#define NUM_LEDS_PER_STRIP 10
CRGB leds[NUM_STRIPS][NUM_LEDS_PER_STRIP];

void setup() {
  FastLED.addLeds<NEOPIXEL, 2>(leds[0], NUM_LEDS_PER_STRIP);
  FastLED.addLeds<NEOPIXEL, 3>(leds[1], NUM_LEDS_PER_STRIP);
  FastLED.addLeds<NEOPIXEL, 4>(leds[2], NUM_LEDS_PER_STRIP);
  FastLED.addLeds<NEOPIXEL, 5>(leds[3], NUM_LEDS_PER_STRIP);
  FastLED.addLeds<NEOPIXEL, 6>(leds[4], NUM_LEDS_PER_STRIP);
  FastLED.addLeds<NEOPIXEL, 7>(leds[5], NUM_LEDS_PER_STRIP);
  FastLED.addLeds<NEOPIXEL, 8>(leds[6], NUM_LEDS_PER_STRIP);

}

  void loop() {
  // This outer loop will go over each strip, one at a time
  for(int x = 0; x < NUM_STRIPS; x++) {
    // This inner loop will go over each led in the current strip, one at a time
    for(int i = 0; i < NUM_LEDS_PER_STRIP; i++) {
      leds[x][i] = CRGB::White;
      FastLED.show();
      leds[x][i] = CRGB::Black;
     
    }
  }
}

Everything goes straight from the card. 5 volt power and ground from card to ledstrip. And from input pin on card to ledstrip DIN.

Hi,

joda555: Everything goes straight from the card. 5 volt power and ground from card to ledstrip. And from input pin on card to ledstrip DIN.

Sorry you can see it, we can't. What are you using for power, how are you powering the LEDs. Please draw a circuit and post a picture of your project. Thanks.. Tom.... :)

    for(int i = 0; i < NUM_LEDS_PER_STRIP; i++) {
      leds[x][i] = CRGB::White;
      FastLED.show();
      leds[x][i] = CRGB::Black;

Do you need the .show the black?

Here is a sketch of my wiring. Pin 2-8 is used to 7 ledstrips.