The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 864 - File: showthread.php PHP 7.2.23 (Linux)
File Line Function
/showthread.php 864 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ontimer
24-02-2015, 03:05 PM,
#1
ontimer
Bonjour,

est-il possible de mettre une variable en delay, à la place dune valeur définit dans le ontimer0 ????

Voici dans quel exemple

#include <interrupt.c>

#define LED0 0
#define LED1 1
#define LED2 2
#define LED3 3

void blink0() { Toggle(LED0); }
void blink1() { Toggle(LED1); }
void blink2() { Toggle(LED2); }
void blink3() { Toggle(LED3); }

void setup()
{

OnTimer0(blink0, INT_MILLISEC, 500); // Use Timer0 to toggle pin 0 every 500 ms
OnTimer1(blink1, INT_MILLISEC, 500); // Use Timer1 to toggle pin 0 every 500 ms
OnTimer2(blink2, INT_MILLISEC, 500); // Use Timer2 to toggle pin 0 every 500 ms
OnTimer3(blink3, INT_MILLISEC, 500); // Use Timer3 to toggle pin 0 every 500 ms
}

void loop()
{
}

merci d'avance

Kenavo
Reply


Messages In This Thread
ontimer - by naindejardin - 24-02-2015, 03:05 PM
RE: ontimer - by gtcbreizh - 24-02-2015, 03:50 PM
RE: ontimer - by naindejardin - 01-03-2015, 11:05 PM
RE: ontimer - by naindejardin - 05-03-2015, 02:23 PM
RE: ontimer - by regis - 05-03-2015, 07:01 PM
RE: ontimer - by naindejardin - 06-03-2015, 12:29 AM
RE: ontimer - by regis - 06-03-2015, 10:16 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)