#define LED1 2
#define LED2 3
#include "TickTwo.h"
void blink1()
{
static byte count = 0;
if (count <= 1)
{ // “erster Aufruf”
digitalWrite(LED1,HIGH);
}
else
{ // weitere Aufrufe
digitalWrite(LED1,LOW);
}
count++;
if (count == 8)
{ // beim n¨achsten Mal Beginn von vorn (mit “erster Aufruf”)
count = 0;
}
}
void blink2()
{
static byte count = 0;
if (count <= 6)
{ // “erster Aufruf”
digitalWrite(LED2,HIGH);
}
else
{ // weitere Aufrufe
digitalWrite(LED2,LOW);
}
count++;
if (count == 8)
{ // beim n¨achsten Mal Beginn von vorn (mit “erster Aufruf”)
count = 0;
}
}
TickTwo ledFunktion1(blink1, 100);
TickTwo ledFunktion2(blink2,50);
void setup()
{
pinMode(LED1, OUTPUT);
ledFunktion1.start();
ledFunktion2.start();
}
void loop()
{
ledFunktion1.update();
ledFunktion2.update();
}