Two analog inputs but only want delay on one output

This should be simple but I cant find any codes to try to adapt.
I have one reostat running a 10 led array and the other input is from a thermistor that I want to make flash a single led.
every time I try to put in a delay it effects both…what part of the code am I leaving out?

const int potPin = 0;
int i = 0;

const int thermistorPin = A5;   // analog pin 5 randomly chosen 
const int bigRedLight = A4;    // over heat warning light


void setup()
{
 pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  
pinMode(bigRedLight, OUTPUT);
  pinMode(thermistorPin, INPUT);
  digitalWrite(bigRedLight, LOW);  // make sure that alarm light is off  
  
}

void loop()
{
  for (i = 1; i<=10; i++);
  digitalWrite(i, LOW);
  

  int val = analogRead(potPin);
  int count = map(val, 0, 1023, 0, 10);
  
  for (i = 1; i<=10; i++)
  if (i<=count)
  {
    digitalWrite(i, HIGH);
  }
  else
  {
    digitalWrite(i, LOW);
  }
 if(analogRead(thermistorPin) <= 90) digitalWrite(bigRedLight, HIGH);
  delay (250);
  digitalWrite(bigRedLight, LOW);
  delay (250);
  
}

every time I try to put in a delay it effects both

Yea, delay() is stupid that way...

what part of the code am I leaving out?

The part that uses millis() to note when the last event occurred, to notice what time it is now, and the part that determines if now minus then is greater than some interval, before actually toggling the pin.

SOOOO...how does that get writen in :~ I am trying to learn how to do these things, but this one? I find examples of one or the other but not together.

Then look at the blink without delay example in the File -> examples -> digital menu.

Linc: I am trying to learn how to do these things, but this one?

You need to build a state-machine. Instead of your code saying "do this, then this, then this..." your code will become "is it time to do this yet?" For example if you want to blink a LED, first you turn it on and record the current time. Then when enough time has passed, you turn it off. That's how you use millis(). It is a timestamp. This is how the blink without delay() example works.

[quote author=James C4S link=topic=100188.msg751409#msg751409 date=1333737482] You need to build a state-machine. Instead of your code saying "do this, then this, then this..." your code will become "is it time to do this yet?" For example if you want to blink a LED, first you turn it on and record the current time. Then when enough time has passed, you turn it off. That's how you use millis(). It is a timestamp. This is how the blink without delay() example works. [/quote]

How do i use this with an input triger? I am still trying though!

How do i use this with an input triger?

The input trigger sets the initial time and state.

I think state machine is the right keyword to search this forum and making it work by yourself with only hints and examples brings best learning results 8)

A state machine means just that you for instance have a variable which holds the actual state (or say step in your list of things to do). For every state you do something else (-> switch statement) and then move to the next state. For instance in state 0 you read your input and evaluate it. If it fits you trigger the next step by changing your state to 1. State 1 makes a digital write and saves the actual timestamp and we got to state 2. This one just checks how much time passed since the recording of the timestamp. If it is enough then you continue with the next state. After the last you return to state 0 and everything starts over.