You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
463 B
27 lines
463 B
3 years ago
|
#include "Arduino.h"
|
||
|
#include "TeensyTimerTool.h"
|
||
|
|
||
|
using namespace TeensyTimerTool;
|
||
|
|
||
|
void callback()
|
||
|
{
|
||
|
digitalWriteFast(LED_BUILTIN, LOW); // switch off LED
|
||
|
}
|
||
|
|
||
|
|
||
|
OneShotTimer timer1; // generate a timer from the pool (Pool: 2xGPT, 16xTMR(QUAD), 20xTCK)
|
||
|
|
||
|
void setup()
|
||
|
{
|
||
|
pinMode(LED_BUILTIN,OUTPUT);
|
||
|
timer1.begin(callback);
|
||
|
}
|
||
|
|
||
|
void loop()
|
||
|
{
|
||
|
digitalWriteFast(LED_BUILTIN, HIGH);
|
||
|
timer1.trigger(10'000); // switch of after 10ms
|
||
|
|
||
|
delay(500);
|
||
|
}
|