controlling neopixels odd behavior

Hi
I had a piece of code written for a nano, I changed it somewhat (instead of random flashes I made a pattern) and wanted to run this on a attiny85PU. Oddly it doesn’t work, only the first led of the strip goes on and never off. I used the same led-strip as before so I know it is good.
I checked with a scope and see the signals go to the led strip, however the interpretation is apparently wrong.
Attached also the schematic (reset R/C is not implemented, it is breadboard only)

It is all not very special, but can’t figure out what is wrong, I also checked several other examples.

Anyone any suggestions? Thanks in advance

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>

#endif


#define LED_PIN 2  //control led
#define CyclePin 1 // switch that triggers display
#define NeoPixel 0 // led strip

#define NUM_LEDS 10
#define LED_LENGTH 29

#define BRIGHTNESS 50

int i, j, delayValue=1;

Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, NeoPixel, NEO_GRB + NEO_KHZ800);

byte Dolfijn[NUM_LEDS][LED_LENGTH] =
{
  {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
  {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0},
  {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0},
  {0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0},
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
  {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0},
  {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1},
};


void setup() {
  // put your setup code here, to run once:
  strip.setBrightness(BRIGHTNESS);
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
  pinMode(CyclePin, INPUT);
  pinMode(LED_PIN, OUTPUT);
  digitalWrite(LED_PIN, HIGH); //verification led short flash
  delay(200);
  digitalWrite(LED_PIN, LOW);
}


void loop() {

  if (digitalRead(CyclePin)== 0) {   // wait for button to be presed

    digitalWrite(LED_PIN, HIGH);  // verification led on
    
    for (i = 0; i < LED_LENGTH; i++) {    // do for each row
      for (j = 0; j < NUM_LEDS; j++) {   // do for each led in a row
        if (Dolfijn[j][i] == 1) {       // is it 1, then light led
          strip.setPixelColor(4, 0, 0, 255);
       }
       strip.show();
       delay(delayValue);
     }
      }
      for (j = 0; j < NUM_LEDS; j++) {
        strip.setPixelColor(j, 0, 0, 0);    // clear all leds again
      }
      strip.show();
      digitalWrite(LED_PIN, LOW);  // verification led off
    
  }
}

wlight.pdf (24.8 KB)

Clock speed? Attiny 85 defaults to 1MHz. Probaby need 8MHz to run NeoPixels.

Fuse bits? What core are you using? If you run the standard blink sketch does the led blink at the expected speed?

Out of RAM memory? Attiny 85 has only 512 bytes of RAM and that array in your code uses nearly 300.

if there is not enough RAM, the compiler will give an error

the blink is indeed longer than expected, in setup I do a 200ms blink, but actually it lasts around 3sec. That seems to point to the fact that it is indeed running on 1MHz (delays will be x16)

In the arduino IDE I set the clockspeed to internal 16Mhz in tools and program it with arduino as ISP using a nano as programmer. I use a loose atTiny chip without bootloader in it

So indeed the 1Mhz may be the problem. have to check why this is not set correctly

if there is not enough RAM, the compiler will give an error

Usually not. The compiler can tell if not enough Flash, but often cannot tell if enough RAM, because that is often only allocated at run-time.

So indeed the 1Mhz may be the problem. have to check why this is not set correctly

You need to select burn bootloader. This will set the fuse bits for the desired frequency. Despite its title, it will not upload a bootloader on tiny85. TAKE CARE to set clock frequency to an INTERNAL frequency. If you accidentally select Burn Bootloader with an EXTERNAL frequency selected, the tiny85 will not be able to operate without an external crystal of that frequency. Even Burn Bootloader will not function without that crystal.