attiny randomizer help

hey, I have been fiddling with this randomizing function... it works for my arduino, but when I uploaded it to an attiny85, both pins lit up at the same time.... not sure why this is.

explanation?

//Randomizer

int LED_2 = 2; int LED_3 = 3;

// a variable to hold a random number long randomNumber;

void setup() {

pinMode(LED_2, OUTPUT); pinMode(LED_3, OUTPUT);

// generate a random seed or starting number randomSeed( analogRead(0) );

}

void loop() { // assign a random number to our variable

randomNumber = random (2,4);

digitalWrite(randomNumber, HIGH);

delay(100);

digitalWrite(randomNumber, LOW);

}

randomSeed( analogRead(0) );

Try analogRead(1)

Code posted properly, using code tags, with excess blank lines removed. No need to use a long integer to reference a pin number.

Keep in mind that the LEDs may be OFF for only a few microseconds, in which case you will not see them unlit.

Do you have the required current limiting resistors in series with the LEDs?

// Randomizer
int LED_2 = 2;
int LED_3 = 3;
// a variable to hold a random number
byte randomNumber;
void setup() {
  pinMode(LED_2, OUTPUT);
  pinMode(LED_3, OUTPUT);
  // generate a random seed or starting number
  randomSeed( analogRead(0) );
}

void loop() {
  // assign a random number to our variable
  randomNumber = random (2, 4);
  digitalWrite(randomNumber, HIGH);
  delay(100);
  digitalWrite(randomNumber, LOW);
}

yes.

update:

I tried uploading to a different attiny85 just for kicks to see if it changed anything and it seems like the first one was defective. i’m not sure what the problem was.