Simple PIR triggering random LEDs

Hello,

Simple problem, stuck! I'm making a display that has LEDs under the snow that will light up "randomly" when triggered by the PIR. I am having trouble getting the PIR into the code (stupid stuff). This is the code I have so far, help! TIA!

#include <stdio.h>
#define numberOfLEDs 18
long nextFlash[18];
int ledPin[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; // LED pins to use.
int ledState[18];
int inputPin = 0 // PIR sensor

void setup(){
  pinMode(inputPin, INPUT);

    
for(int i = 0; i<numberOfLEDs; i++){
  pinMode(ledPin[i],OUTPUT);
  ledState[i] = LOW;
  digitalWrite(ledPin[i], LOW); // all LEDs off
    nextFlash[i] = millis() +random(10,700);
}
}

void loop(){
    val = digitalRead(inputPin);  // read input value
    if (val == HIGH) {            // check if the input is HIGH
      for(int i = 0; i<numberOfLEDs; i++){
        if(millis() > nextFlash[i]){
          if(ledState[i] == LOW) ledState[i] = HIGH; 
            else ledState[i] = LOW;
                 digitalWrite(ledPin[i],ledState[i]);
    nextFlash[i] = millis()+random(10,1250) ; // next toggle random time
//delay(millis()+random(10,13));
} 
}
}

int inputPin = 0 // PIR sensorHere, have a spare one of these ';'

thank you, look at my existing code...have one already :wink:

NOW, to make it work within the rest of the code...

noobandknowit:
thank you, look at my existing code...have one already :wink:

?

Look at line 6

No, sorry, I don't see what you're getting at.

Please see reply #1

(BTW, the "= 0" is redundant)

DOH! Missed your point (;).

Even after that there are huge issues integrating the input pin state. Ideas? Thanks!

(dammit, stupid emoticons, I mean I get the lack of the semi-colon, thank you)