To launch 2 LED same time with different intervals and with no. of repeat


hi, have code below:
the code flow press button, led1 on delay(timingled1a) off delay(timingled1b), repeat follow no.repeat been set. code cant make led2 turn on same time led1. can me on this?

code: [select]

void fireled1()
{
  for(int i=0; < no.repeat; i++)
  {
    digitalwrite(led1, high);
    delay(timingled1a);
    digitalwrite(led1, low);
    if(i < (no.repeat - 1))
    {
      delay(timingled1b);
    }
  }
}

void led2()
{
  for(int i=0; < no.repeat2; i++)
  {
    digitalwrite(led2, high);
    delay(timingled2a);
    digitalwrite(led2, low);
    if(i < (no.repeat2 - 1))
    {
      delay(timingled2b);
    }
  }
}

get rid of calls "delay".
have @ blink without delay example clues on how this.


Arduino Forum > Using Arduino > Project Guidance > To launch 2 LED same time with different intervals and with no. of repeat


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62