LPD8806 RGB LED Strip - Reverse Engineer (with pics) questions/feedback

I bought 2m of the Digital Addressable RGB LED w/ PWM waterproof flexi strip from adafruit.


I plan on building my own strips on PCB rather than being flexible. There will be around 36 LED's or more on PCB arranged in a square grid. These can be connected to other squares or can be cut into strips and connected that way. Feedback on this idea would be appreciated. I already have some LPD8806 IC's and 5050 RGB SMD LED's. Now I need to order the resistors but am a bit stumped...

There is a description and schematic on this link: Digital RGB LED Weatherproof Strip - LPD8806 32 LED : ID 306 : $149.75 : Adafruit Industries, Unique & fun DIY electronics and kits

The schematic looks like:

The problem I'm having is that the resistors on the strip are all 1.5ohm rather than what the schematic shows and what I expected to see. This means that the LPD8806 is current limiting rather than dropping the voltage as with the older HL1606 strips, correct? If this is the case, it makes the chips a bit better than I thought.

There is also a capacitor with each IC so I removed one to measure the capacitance of it. Unfortunately, I broke it during removal. I was still able to measure it at 100pF and luckily, had a larger 1206 100pF SMD on hand to replace the smaller 0805 100pF SMD. Not that I think it would have mattered at the end of the strip whether it was there or not.

Now for some pics I took with my ViTiny USB microscope.....

Broken capacitor next to a 0805 sized resistor:

Resistors for the Red and Green on the 5050 RGB LED:

My replaced 1206 size capacitor (not the best solder job but it will do):

Closeup of the 5050 RGB LED:

Center gold wire on the 5050 RGB LED:

Side gold wires on the 5050 RGB LED (there is one on the left and right side like this):

Fair warning... I absolutely love the LPD8806 but it doesn't seem to be generally available for purchase. I've been able to find a few Chinese distributors that seem to be able to sell individual (knockoff) ICs but outside of those particular strips that IC is not very popular. Strips based on it are not even commonly produced in China by more than a couple manufacturers and Adafruit is by far their only 15 minutes of fame it seems. The only datasheet that's even surfaced for them is Chinese only and doesn't even include the SPI timing information. From what I've come to understand (through rumors primarily) is that the original IC was created for very high end DMX controlled setups and is officially licensed with all the Phillips PWM LED patent crap and therefore not intended for you.

I believe the strip we have is assembled using pretty typical knockoff symptoms - this is (IMO) possibly the best PWM LED IC on the market (particularly if you want speed) and yet the build quality of the actual FPC, soldering, silkscreen, etc is quite low. That said, you're going to have to know that everything you try to do with that IC is going to be a guess. Cloning a working strip isn't a bad place to start but you'll never really know if you're within correct tolerances, current, etc because it appears to be a very good IC that isn't actually supposed to be retailed.

On the other hand, the WS2801 has a few technical shortcomings in comparison but is very available, common, supported, etc and will remove the guess-work for you if you're working on something where that's important. In brief comparison you'll have to run a WS2801 at less than a quarter the refresh rate of a LPD8806 (2Mhz vs 8Mhz, plus a 500uS latch time on the WS2801) but it does full 24-bit color instead of the LPD806's 21-bit. If you need the high refresh rate, forge on soldier and don't stress on the details. If you can sacrifice speed for nice documented high quality solutions, look into the WS2801.

Thanks for the insight with your knowledge of the subject. You are right, these strips are not readily available for purchase. I did find a source that sells the strips for about half (including shipping) of the cost to be found here in the states. I have found a source in China where I bought a couple hundred of the ICs for just under a quarter each though. This will get me going into making my own. Since there is already a library for the Arduino for controlling the strip, the timing is not an issue.

I agree that the quality is not top notch and certainly not what one should expect for the current pricing of around $35/meter but making my own PCBs for this lighting will allow me to better balance quality with cost. The downside is that it will not be a flexible strip.

Another LED driver IC I've looked at and purchased a few of is the DMX163. It is the IC used for the colorduino and is more flexible than the LPD8806. It will control up to 8 LEDs with constant current set with 3 resistors (one for each color) and can sink 60mA for each. It has PWM control, 2 banks for grayscale data (6 bit and 8 bit) and can run at a frequency of up to 20MHz. The downsides are, like the LPD8806, it is not readily available. It also costs about $4.50 ea in low quantity.

Overall, I'm not looking to do many thousands of these. I have 1400 5050 RGB LEDs and intend to use them in some fashion for myself and some friends. I also have 200 LPD8806's and 4 DMX163's. I will now have to order a sample of WS2801 ICs to compare to as well, I guess. :slight_smile:

I just looked at the spec sheet for the DM163 and am ruling them out. There are 7 wires required to be run between each IC rather than just 2 (SIN, DCK, LAT_B, GCK, SELBK, EN_B, RST_B). This would complicate things too much and then I'm in the territory of using TLC5940's like I did on my stairs project.

Just curious, where are you finding all these chips and strips?

For those interested in the strips I found to be cheaper, it is here:

The description states 12v but after inquiring about this, I found out these are actually a 5v model. The group several types together with different ICs (specifically 6803, 8806, & 2801).

The quote I was provided for 10 meters shipped was $145. I did not buy from them because they wanted a wire transfer or western union. I did not trust this.

If anyone does decide to go this route, please post pictures and user experience. :slight_smile:

Alibaba is a great place to get ripped off, though if you find a reputable seller you will get great deals. A better place to import junk from China is their sister site aliexpress.com.

I've looked into these strips previously and found they are typically advertised under "dream led". Aliexpress is safe as long as you don't let anyone convince you to wire money instead of pay them through their escrow service options. I just figure out what I need about a month in advance and order using the cheapest shipping option so it gets here on time. You will still get good deals with faster more expensive shipping options but as a student I penny pinch wherever I can 8)

I would be very interested if somebody does a project with these, I've been wanting to for a while now but have some other stuff I would like to complete first.

First I'd like to say thanks for the great descriptions you guys put after mentioning something. It's really helpful in piecing together a possible project plan. I have a project I'm starting to work on and I'm trying to figure out the right, well... everything I need to buy to do what I want.

I'm a network engineer, so software development/electronics aren't my forte, but wanting to learn it all. I have another thread if you have more opinions on my project.

http://arduino.cc/forum/index.php/topic,83225.0.html

There are a whole variety of devices such as 8806, 8603, 1603 etc which are all essentially rip offs of devices made under license for major led lighting manufacturers.

In the real world, any real IC device can be found in the public domain and traced to its manufacturer with plenty of resources to official datasheets.
However, as you have already seen, trying to find a datasheet for these devices are almost impossible and I have access to some corporate search tools which dont find them. I do have Chinese versions too, which I have had translated from trusted sources, but even then there were operational and even pin out differences.
For hobbyists sourcing devices, steer clear of any devices that are in a QFN package unless your got some good kit to solder them, instead go for TSOP packages.

Alibaba and Alibaba Express are great and to date have never had any issues with bank transfers. I personally dont like bank transfers for small orders only due to the charges incurred when sending payments for sample and full orders.
Yes, choose ESCROW where possible, especially on your first order. You have to build a relationship with the company and try to trust them.
There are many companies offering products which are just agents, you ask them anything technical, then they wont have a clue.
You should request a full product datasheet that covers the strip, if they cant then move on.
Whilst your communicating with the "supplier" they should give you confidence in the answers they provide. Do they also supply the correct controllers and connectors? Can they provide details on connections and usage? Do they supply stock/generic images that you have seen 100 times already.
Also do take into consideration the language barrier (Chinglish), some contacts will be pure sales and not technical at all and so they will be dazzled when you start picking holes in the lame responses.
Theres a lot to finding decent suppliers, without going out and meeting them. Its taking me years to build a list of trusted vendors.

Quality of some products can be an issue, its the whole, you get what you pay for and its from China syndrome, which really bugs me.
Over the years I have worked with several Chinese distributors to change their branding, websites, technical documentation and general pre and post sales support to help them deal with the western expectations. Things have improved, but too slow as I have found that the Asian vs US/Euro sales market is too far apart for some to really care.

A few years back, when LED lighting started to take off, I created a LED sourcing site with the idea for hobbyists to post a request for a product and I would put them in touch and/or handle the transaction for them. At the time it never took off, but perhaps I should look at that again.

OK, I am rambling now :slight_smile:

Simon

Simon,

Great informative post. I can tell you have had a lot of experience and frustration in this area. That is unfortunate. But I do like your idea of an LED sourcing site. Perhaps now, in the advent of LED lights being more and more accepted in households and the efficiency of LED's starting to really make them worthwhile as replacements for traditional and CFL lights, it would be more successful. And you could have a forum to share your thoughts and experiences to educate the rest of us. :slight_smile:

I currently have 200 of the 8806 and 1400 5050 RGB leds. I haven't been able to start building with them yet but will very soon. If the 8806s work out well, I'll buy more since they only cost about $0.50 ea. If not, there are other alternatives to look at. I just want something that will be much more cost effective and have more flexibility (figuratively) than the $35/m RGB LED flexible strips. In materials (not including the PCB), it will cost me < $11/m for the same thing. I just won't have the flexibility (literally).

Cranium:
For those interested in the strips I found to be cheaper, it is here:
This product is no longer available.

The description states 12v but after inquiring about this, I found out these are actually a 5v model. The group several types together with different ICs (specifically 6803, 8806, & 2801).

The quote I was provided for 10 meters shipped was $145. I did not buy from them because they wanted a wire transfer or western union. I did not trust this.

If anyone does decide to go this route, please post pictures and user experience. :slight_smile:

Funnily enough, this is the exact same thing that I found a few days ago and have ordered from this supplier, before seeing this thread (I am currently trying to work out how a different strip works in another thread, without much joy). I've already paid them via Western Union, total of $75 for 5 metres and DHL shipping. They claim to be having trouble with my address - which is entirely plausible given my location, but we shall see. I am expecting to hear back from them next week, should have the strip within two weeks. The 8 hour time difference is a bit of a problem when it comes to resolving issues.

citlee:

Cranium:
For those interested in the strips I found to be cheaper, it is here:
This product is no longer available.

The description states 12v but after inquiring about this, I found out these are actually a 5v model. The group several types together with different ICs (specifically 6803, 8806, & 2801).

The quote I was provided for 10 meters shipped was $145. I did not buy from them because they wanted a wire transfer or western union. I did not trust this.

If anyone does decide to go this route, please post pictures and user experience. :slight_smile:

I would be extremely interested in continuing to hear about your experience on this purchase. If you do receive it, please post some pictures of the strip showing the IC's and LED configuation. If it is using a 5V power supply the LPD8806 library should work well with it.

Funnily enough, this is the exact same thing that I found a few days ago and have ordered from this supplier, before seeing this thread (I am currently trying to work out how a different strip works in another thread, without much joy). I've already paid them via Western Union, total of $75 for 5 metres and DHL shipping. They claim to be having trouble with my address - which is entirely plausible given my location, but we shall see. I am expecting to hear back from them next week, should have the strip within two weeks. The 8 hour time difference is a bit of a problem when it comes to resolving issues.

citlee:

Cranium:
For those interested in the strips I found to be cheaper, it is here:
http://www.alibaba.com/product-gs/505148128/LPD8806_digital_RGB_colorful_led_strip.html

The description states 12v but after inquiring about this, I found out these are actually a 5v model. The group several types together with different ICs (specifically 6803, 8806, & 2801).

The quote I was provided for 10 meters shipped was $145. I did not buy from them because they wanted a wire transfer or western union. I did not trust this.

If anyone does decide to go this route, please post pictures and user experience. :slight_smile:

Funnily enough, this is the exact same thing that I found a few days ago and have ordered from this supplier, before seeing this thread (I am currently trying to work out how a different strip works in another thread, without much joy). I've already paid them via Western Union, total of $75 for 5 metres and DHL shipping. They claim to be having trouble with my address - which is entirely plausible given my location, but we shall see. I am expecting to hear back from them next week, should have the strip within two weeks. The 8 hour time difference is a bit of a problem when it comes to resolving issues.

Cranium and Citlee, I am in the same boat- I want to buy some from Alibaba but I'm not sure about it. I'd love to hear your experience in particular, Citlee, because if yours come OK I would buy some from that seller! Can you provide a link to the seller/item you paid for? Much appreciated, please keep us posted!

theavianbrain:
Cranium and Citlee, I am in the same boat- I want to buy some from Alibaba but I'm not sure about it. I'd love to hear your experience in particular, Citlee, because if yours come OK I would buy some from that seller! Can you provide a link to the seller/item you paid for? Much appreciated, please keep us posted!

I'm afraid I can't provide a link to the exact item, but the supplier is "clenled", http://clenled.en.alibaba.com and http://www.clenled.com/en/ - the sales manager is "Andy", who is very helpful (his native language is definitely not English but bear with him). My item arrived today after a mishap with the courier being unable to find my address (not clenled's fault!).

I can't provide a link because frankly I don't know which product I have - I was chatting to Andy, initially asking about another product, and then I remembered seeing somewhere that an LPD8806 driven strip is what I really wanted, so I asked him if he had any and this is what I ended up with. I don't think it's the product in the url posted previously because it doesn't quite match up - the sections are 6 LEDs a piece, and the red wire is connected to "DA", for example. Let me show you what I mean, through interpretive dance!

Actually, maybe some photos would be better.

Here's the chip:

A section:

The join between the two sections:

I am waiting for the spec sheet from Andy, when it arrives, I'll post it here.

The text on the label on the anti-static bag it came in is as follows:
Part no: CL-FW5050RGB18-8806
IP67 waterproof color: RGB
Voltage: DV12V, 8.6W/M
Qty: 36 LED/M, 5M/roll

I am a complete and utter newb when it comes to this stuff (Arduino, controlling LEDs, using electronics on this level) so any advice appreciated. To be honest I'm not sure what to do next to actually get some light out of it - should I just go ahead with the Adafruit LPD8806 tutorial, or does that carry a risk of blowing stuff up? I do have a 12v 5a power supply that I ordered and have tested with a different (dumber) strip, which I am planning to use to power this.

Thanks for the post and pictures of the strip. Very informative. It is interesting that they are using 12V rather than 5V that the 8806 needs. Looking at the resistors and layout, it appears that this strip will have limitations.

You can use the arduino for the CLK and DA pins and then use your 12V power source to power it. The LPD8806 library should work with this strip.

I think with this configuration, you will only be able to control colors every 3rd LED rather than every LED as with the strips on Adafruit. The LEDs on each side of the 8806 appear to be in series with an additional resistor for each to drop voltage further. The max power dissipation of the 8806 is 600mW so with 6 RGB LEDs, it would be able to supply a maximum of only 6.7mA to each leg of each LED. This coincides with the 180 ohm resistors for the green and blue legs in the pics. These resistors would limit current to around 6mA for each color. This would mean it would not be as bright as the strip on Adafruit that can supply the full rated 20mA to each leg of each LED.

But this is all based on looking at the photos and my limited knowledge of these things. You won't really know until you hook it up and find out. :slight_smile: Please post a follow up on this.

Unfortunately, of the dozens of electronic components (ignoring the mystery bag of semi-random ICs) that are neatly organised, my collection doesn't include a DC power socket, so short of butchering the power supply I have no way to power the strip! I have ordered some from rapidonline.com and they should be here next week.

Cranium:
I think with this configuration, you will only be able to control colors every 3rd LED rather than every LED as with the strips on Adafruit. The LEDs on each side of the 8806 appear to be in series with an additional resistor for each to drop voltage further. The max power dissipation of the 8806 is 600mW so with 6 RGB LEDs, it would be able to supply a maximum of only 6.7mA to each leg of each LED. This coincides with the 180 ohm resistors for the green and blue legs in the pics. These resistors would limit current to around 6mA for each color. This would mean it would not be as bright as the strip on Adafruit that can supply the full rated 20mA to each leg of each LED.

But this is all based on looking at the photos and my limited knowledge of these things. You won't really know until you hook it up and find out. :slight_smile: Please post a follow up on this.

More knowledge than me, that's for sure!

The power sockets have arrived, and after killing one (I don't think I could solder to save my life) it's alive. I followed the ladyada.net tutorial for the LPD8806 and it works, with a minor adjustment.

As you surmised, the LEDs are unfortunately controlled in batches of three rather than individually. :frowning:

With this strip there are 10 segments. Each segment has 18 LEDs, but as they're controlled in groups of 3, that means there are essentially 6 pixels/segment. So you need to:

LPD8806 strip = LPD8806(60, dataPin, clockPin)

to control the entire length of the strip in the way that you would expect.

So not exactly what I was after (I still don't have the spec sheet), but it's 1/3rd the cost of the adafruit strip, is good enough for what I want, and gives me a relatively easy way to control the colours using the LPD8806 library.

I hope this is of some use to someone!

Very useful. Now let's get some video of the strip. :slight_smile:

I did a wheelchair project with the 2m I had and put together some basic sequences...17 in all. If you'd like any of the animations in the video, let me know....

Sure, post 'em here for everyone to see! Although I don't think they're going to look as good as in your video, as they'll essentially be stretched out three times...

#include "LPD8806.h"
#include "SPI.h"

#define button 8
#define stripSize 64
int butPush = 0;
int currentMode = 17;
int numModes = 17;

// on Arduino 168/328 thats data = 11, and clock = pin 13
LPD8806 strip = LPD8806(stripSize);

void setup() {
  // Start up the LED strip
  strip.begin();

  // Update the strip, to start they are all 'off'
  strip.show();
//  Serial.begin(9600);
  pinMode(button,INPUT);
}
int micLevel;
int colorLevel;
int numLeds;

void loop() {
  if (butPush){
    if (currentMode++==numModes) currentMode = 3;
    butPush=0;
    while (digitalRead(button)==1){
      //don't do anything else until the button is released
    }
    for (int i=0; i < strip.numPixels(); i++) {
      strip.setPixelColor(i, 0);  // turn all pixels off
    } 
    strip.show();
    delay(250);
  }
  modeSelect();
}

void modeSelect(){
  switch (currentMode){
    case 1:
      music(0);  //sound sensitive mode with variable LEDs lit
      break;
    case 2:
      music(1);  //sound sensitive mode with ALL LEDs lit
      break;
    case 3:
      colorChase(strip.Color(127,0,0), 20);  	// full brightness red
      colorChase(strip.Color(127,127,0), 20);	// orange
      colorChase(strip.Color(0,127,0), 20);		// green
      colorChase(strip.Color(0,127,127), 20);	// teal
      colorChase(strip.Color(0,0,127), 20);		// blue
      colorChase(strip.Color(127,0,127), 20);	// violet
      break;
    case 4:
      // fill the entire strip with...
      colorWipe(strip.Color(127,0,0), 40);		// red
      colorWipe(strip.Color(0, 127,0), 40);		// green
      colorWipe(strip.Color(0,0,127), 40);		// blue
      break;
    case 5:
      rainbow(25);
      break;
    case 6:
      rainbowCycle(0);  // make it go through the cycle fairly fast
      break;
    case 7:
      caution(600);  //flash red and blue
      break;
    case 8:
      police(115);  //flash yellow
      break;
    case 9:
      circlinglights(20);  //flash yellow
      break;
    case 10:
      allon();  //all white
      break;
    case 11:
      ran(20);  //random lights
      break;
    case 12:
      ran1(15);  //random lights
      break;
    case 13:
      shiftwhite(100);
      break;
    case 14:
      kit(1);
      break;
    case 15:
      rand2(50);
      break;
    case 16:
      allon1(50); // white flicker
      break;
    case 17:
      xmas(300);
      break;
  }
}
void xmas(int dly){
  int color=0;
  while (butPush==0){
    for (int i=0; i<stripSize; i++){
      if (digitalRead(button)==1) {butPush=1; i=stripSize;}
      if (color==4){
        strip.setPixelColor(i,127,127,127); //white
      }
      else if (color==3){
        strip.setPixelColor(i,127,90,0); //yellow
      }
      else if (color==2){
        strip.setPixelColor(i,0,0,127); //blue
      }
      else if (color==1){
        strip.setPixelColor(i,0,127,0); //green
      }
      else {
        strip.setPixelColor(i,127,0,0); //red
      }
      if (color++==4) color=0;
    }
    if (butPush==0){
      strip.show();
      delay(dly);
    }
  }
}
void allon1(int dly){
  while (digitalRead(button)==0){
    int red = random()%128;
    int green = random()%128;
    int blue = random()%128;
    for (int i = 0; i < stripSize; i++){
     strip.setPixelColor(i, red, green, blue);
   } 
   strip.show();
   delay(dly);
    for (int i = 0; i < stripSize; i++){
     strip.setPixelColor(i, 0,0,0);
   } 
   strip.show();
   delay(dly);
  }
  butPush = 1;
}
void rand2(int dly){
  //turn on lights one at a time with the same random color
  //ensure that a light is turned on each cycle
  //then turn off the lights 2 at a time
  int lights[stripSize];
  for (int i=0; i<stripSize; i++) lights[i]=0;
  while (digitalRead(button)==0){
    int red = random()%128;
    int green = random()%128;
    int blue = random()%128;
    for (int i = 0; i < stripSize; i++){
      int turnon=0;
      while (turnon==0){
        if (digitalRead(button)==1) {i=stripSize; butPush=1;}
        int x = random()%stripSize;
        if (lights[x]==0){
          turnon=1;
          lights[x]=1;
          strip.setPixelColor(x,red,green,blue);
          strip.show();
        }
      }
    if (butPush==0) delay(dly);
    } 
  if (butPush==0)   delay(2000);
    for (int i = 0; i < stripSize; i++){
      int turnoff=1;
      while (turnoff==1){
        if (digitalRead(button)==1) {i=stripSize; butPush=1;}
        int x = random()%stripSize;
        if (lights[x]==1){
          turnoff=0;
          lights[x]=0;
          strip.setPixelColor(x,0,0,0);
          strip.show();
        }
      }
    if (butPush==0) delay(dly);
    } 
  }
}
void kit(int dly){
  int lmin=0; int lmax=16; int lx=1; int lcur=lmin;
  int rmin=32; int rmax=48; int rx=1; int rcur=rmin;
  int bmin=50; int bmax=62; int bx=0; int bcur=bmax;
  int fmin=18; int fmax=30; int fx=0; int fcur=fmax;
  int wlev=8;
  int lrticks=6; //number of times to loop through before moving the leds
  int fbticks=8; //number of times to loop through before moving the leds
  int tick=1;
   for (int i=lmin; i<lmax; i++){
     strip.setPixelColor(i,wlev,wlev,wlev);
   }
   for (int i=rmin; i<bmax; i++){
     strip.setPixelColor(i,wlev,wlev,wlev);
   }
  while (digitalRead(button)==0){
     for (int i=0; i<2; i++){
       //calculate brightness level for position.  Closer to the center is brighter
       //turn on 2 leds at a time
//       strip.setPixelColor(lcur+i,127/abs(((lmax-lmin)/2)-lcur),0,0);
//       strip.setPixelColor(rcur+i,127/abs(((rmax-rmin)/2)-(rcur-rmin)),0,0);
//       strip.setPixelColor(bcur+i,127/abs(((bmax-bmin)/2)-(bcur-bmin)),0,0);
//       strip.setPixelColor(fcur+i,127/abs(((fmax-fmin)/2)-(fcur-fmin)),0,0);
       strip.setPixelColor(lcur+i,127,0,0);
       strip.setPixelColor(rcur+i,127,0,0);
       strip.setPixelColor(bcur+i,127,0,0);
       strip.setPixelColor(fcur+i,127,0,0);
     }  
     strip.show();
     delay(dly);
     strip.show();
     if (tick%lrticks==0){ //Do we need to change the position?
       for (int i=0; i<2; i++){
         //turn the 2 leds back to white
         strip.setPixelColor(lcur+i,wlev,wlev,wlev);
         strip.setPixelColor(rcur+i,wlev,wlev,wlev);
       }  
       if (lx==1) lcur++;  //increment or decrement the position
       else lcur--;
       if (lcur>=lmax) lx=0; //Are we at the max?
       if (lcur<=lmin) lx=1; //Are we at the min?
       if (rx==1) rcur++;  //increment or decrement the position
       else rcur--;
       if (rcur>=rmax) rx=0; //Are we at the max?
       if (rcur<=rmin) rx=1; //Are we at the min?
     }
     if (tick%fbticks==0){ //Do we need to change the position?
       for (int i=0; i<2; i++){
         //turn the 2 leds back to white
         strip.setPixelColor(bcur+i,wlev,wlev,wlev);
         strip.setPixelColor(fcur+i,wlev,wlev,wlev);
       }  
       if (bx==1) bcur++;  //increment or decrement the position
       else bcur--;
       if (bcur>=bmax) bx=0; //Are we at the max?
       if (bcur<=bmin) bx=1; //Are we at the min?
       if (fx==1) fcur++;  //increment or decrement the position
       else fcur--;
       if (fcur>=fmax) fx=0; //Are we at the max?
       if (fcur<=fmin) fx=1; //Are we at the min?
     }
     if (tick++==lrticks*fbticks) tick=1;
  }
  butPush = 1;
}
void shiftwhite(int dly){
  for (int o = 0; o < stripSize; o++){
    for (int i = 0; i <stripSize; i=i+5){
      strip.setPixelColor((i+o)%stripSize, 127,127,127);  
//      strip.setPixelColor((i+1+o)%stripSize, 127,127,127);  
      strip.setPixelColor((i+2+o)%stripSize, 0,127,0);  
      strip.setPixelColor((i+3+o)%stripSize, 0,127,0);  
      strip.setPixelColor((i+4+o)%stripSize, 0,127,0);  
      strip.setPixelColor((i+5+o)%stripSize, 0,127,0);  
      if (digitalRead(button)){
        butPush = 1;   //Was the button pushed to change modes?
        i = stripSize;
        o = stripSize;
        }
    }
    strip.show();
    if (butPush == 0) delay(dly);
  }
}