I am working on a hula hoop that displays patterns.

I am working on a hula hoop that displays patterns. I am trying to modify this code to duplicate the image down a strip of leds. I am able to get the code to duplicate the image but it is not working exactly as it should. The first image works fine and the second displays and then I get a bunch of “noise” or random bits that randomly light various leds for a second. Below is the code from Adafruit.

This part is where the image processing to the leds is happening.

case PALETTE1: { // 1-bit (2 color) palette-based image
  uint8_t  pixelNum = 0, byteNum, bitNum, pixels, idx,
          *ptr = (uint8_t *)&imagePixels[imageLine * NUM_LEDS / 8];
  for(byteNum = NUM_LEDS/8; byteNum--; ) { // Always padded to next byte
    pixels = *ptr++;                       // 8 pixels of data (pixel 0 = LSB)
    for(bitNum = 8; bitNum--; pixels >>= 1) {
      idx = pixels & 1; // Color table index for pixel (0 or 1)
      strip.setPixelColor(pixelNum++,
        palette[idx][0], palette[idx][1], palette[idx][2]);
    }
  }
  break;
}

When I redefine pixelNum to a led further down the line, nothing happens. I am trying to make it display the image twice. One image right side up and the next image upside down. Any ideas?

I’m interested in what materials you are using for the hoop itself?

@Sebastian_Climent HDPE usually. Polypropylene is a bit more clear but HDPE is more durable. USplastics is the supplier ive used before. It is not typically carried at hardware stores. The code above is bitshifting data and it does not work to reassign the first led.

@Chris_Stock What microcontroller are you going to use? Most wont fit inside of some hoops

https://forum.pjrc.com/threads/30020-Teensy-APA102-POV-Poi-Pixel-Poi-Build-Tutorial

Adafruit Trinket fits. Ive read all of those tutorials. I use adafruit’s genesis poi code because it stores lots of patterns by using palettes. The way the data is managed makes it harder to modify the display of the patterns over leds compared to the teensy build by Mortonkopf. I was able to get the patterns to repeat using Mortonkopf’s code but it uses RGB values and it takes up a lot of room.

@Chris_Stock also heres a lot of patterns from phoenix hoops in .bpm https://www.spin-fx.com/wp-content/uploads/2015/06/MARCH-2016-Phoenix-Load-.zip
Edit:

meant to add this one, This is hyperion hoop patterns. just .bpms but good patterns

http://www.hyperionhoop.com/patterns170918.zip