#include <teensy4/teensy.h>
#include <TeensyTimer.h>
TeensyTimer timer;
void setup() {
timer.setClock(100000000);
timer.setMode(TeensyTimer::MODE_PWM);
timer.setCount(10);
timer.setInterval(40000000);
timer.start();
}
void loop() {
// ...
}
#include <teensy4/teensy.h>
. It also throws a fatal error: teensy4/teensy.h: No such file or directory.You didn't specify how precice you need that pulse. If you only need something roughly 10ns you can use the following code. It will generate a pulse of about 13ns every 50ms.OK.
Someone can help me to write simple code that just run 10 nanosecond pulse?
IntervalTimer timer;
void pulse()
{
digitalWriteFast(0,HIGH);
//digitalWriteFast(0,HIGH); add more of those lines if you need to make the pulse longer
digitalWriteFast(0,LOW);
}
void setup()
{
pinMode(0, OUTPUT);
timer.begin(pulse,50'000);
}
void loop()
{
}
Here: https://github.com/luni64/TeensyTimerTool/wikiWhere I can find all command that I can use with TeensyTimerTool library?
You can't.How I can measure Frequency, Pulse width and Pulse Height with TeensyTimerTool library?