Having trouble programming a specific scenario

Hi, i have 3 arduino's with RF, im trying to blink a LED with delays on each of them.

This is the code i have so far, its working but only when using an interupt i would now like to do the same for as long as some pin is HIGH. Im having trouble running 2 actions seperately and in different time.

int id = 1;
int led = 13;
int button = 2;
int state = false;

void setup(void){
  Serial.begin(9600);
  pinMode(led, OUTPUT); 
  pinMode(radar, INPUT); 
  attachInterrupt(0, blink, FALLING);
}
 
void loop(void){ 
  if (Serial.read() == 1) {
    Serial.write(1);
    state = true;
  } 
  else if (Serial.read() == 9) {
    state = false;
  }
  
  if (state) {
    if (id == 1) {
      
    }
    if (id == 2) {
      delay(300);
    }
    if (id == 3) {
      delay(600);
    }
    
    digitalWrite(led, HIGH);
    delay(500);
    digitalWrite(led, LOW);
    delay(500);
    
    if (id == 1) {
      delay(600);
    }
    if (id == 2) {
      delay(300);
    }
    if (id == 3) {
      
    }
  }
}

void blink()
{
   Serial.write(1);
}

Let us all intone the mantra..."take a look at the blink without delay example, without delay".

AWOL:
Let us all intone the mantra..."take a look at the blink without delay example, without delay".

Ok, ive looked at it, and im not impressed at all.
This is the code i have so far, and it works for like 1st sequence then it goes all random. Ive used millis for 2 actions but i have another 6 blink actions with different delays, i just dont see a way for me to program this with this primitive constructs, are there any threads, timers which i can reset on each sequence and then re-run again on some event??

Only 2 interupts??
No pull-down on the pins??

I want to listen for a PIN when it goes HIGH (or low in arduino case), send an RF signal and then run a sequence of 6 different delays (with blinking in beetween) depending on the ID of the device, and looping this as long as the pin is HIGH, when pin goes LOW issue an RF stop command (allowing a running sequence to finish) and then stop and reset all timers.

int id = 1;
int led = 13;
bool ledState = false;
int radar = 2;
bool radarState = false;
long previousRadarRead = 0;
long radarReadInterval = 100;
long previousSequenceRun = 0;
long sequenceRunInterval = 1600;

void setup(void){
  Serial.begin(9600);
  pinMode(led, OUTPUT); 
  pinMode(radar, INPUT); 
  digitalWrite(radar, HIGH); 
}
 
void loop(void){ 
  unsigned long currentRadarMillis = millis(); 
  
  if (currentRadarMillis - previousRadarRead > radarReadInterval) {
    previousRadarRead = currentRadarMillis;
    
    if (!digitalRead(radar)) {
      Serial.write(1);
      radarState = true;
    }
    else {
      Serial.write(9);
      radarState = false;
    }
    
    if (Serial.read() == 1) {
      Serial.write(1);
      radarState = true;
    }
    else if (Serial.read() == 9) {
      Serial.write(9);
      radarState = false;
    }
  }
  
  if (radarState) {
    
    unsigned long currentSequenceMillis = millis(); 
    
    if (currentSequenceMillis - previousSequenceRun > sequenceRunInterval) {
      previousSequenceRun = currentSequenceMillis;
      
      if (id == 1) {
      
      }
      if (id == 2) {
        delay(300);
      }
      if (id == 3) {
        delay(600);
      }
    
      digitalWrite(led, HIGH);
      delay(500);
      digitalWrite(led, LOW);
      delay(500);
    
      if (id == 1) {
        delay(600);
      }
      if (id == 2) {
        delay(300);
      }
      if (id == 3) {
      
      }
    }
  }
}

Only 2 interupts??
No pull-down on the pins??

No - only two directly-vectored external interrupts.
There are interrupts for timer overflow, end of ADC conversion, pin change interrupts - just over two dozen of them all told, IIRC.

Why do you want built-in pulldowns?

i just dont see a way for me to program this with this primitive constructs

It's strange that many other people seem to manage.

delay(600);

Oops. Read the blink without delay example again

(Is there something sticky under your question-mark key?)

Se3ker:
Ive used millis for 2 actions but i have another 6 blink actions with different delays, i just dont see a way for me to program this with this primitive constructs

I must admit that I haven't read the details of what you're trying to achieve but I get that you want to carry out a sequence of timed actions, maybe different independent sequences in parallel or in different situations.

You can achieve all these things using finite state machines with timing controlled using the non-blocking approach demonstrated in blink without delay. The general scheme is that for each sequence you want to control independently, you have a state variable which holds a value telling you where abouts you are in that sequence. For example if one sequence consists of a number of flashes at varying intervals, you would number the flashes actions (0, 1, 2, ...) and hold the number of the current action in the state variable. Depending how many different sequences you wanted to support and how complex they are you might choose to hard-code the timing inside the state machine, or put the intervals in an array. The state machine would implement the logic to work out the timing between actions. Here's a trivial example to demonstrate the approach:

const byte STEP_COUNT = 6;
const unsigned long StepDuration[STEP_COUNT] = {1000, 2000, 3000, 4000, 3000, 2000};
const unsigned long StepValue[STEP_COUNT] = {HIGH, LOW, HIGH, LOW, HIGH, LOW};
...
if(millis() - startTime > StepDuration[currentStep])
{
	// time to advance to the next step
	currentStep++;
	if(currentStep < STEP_COUNT)
	{
		startTime = millis();
		digitalWrite(ThePin, StepValue[currentStep]);
	}
	else
	{
		// sequence complete
		// TODO: define what you want to happen here
	}
}

There are other ways to code the same behaviour and you could eliminate some of the data (at the cost of a small increase in complexity) if you want - this is just intended to show the concept.