ninja2
Well-known member
This little sketch works normally even though I've commented the first two lines in setup.
In other words Serial.begin() seems pointless ?
and:
How does it know to use 115200 ?
Why don't I see the baud rate selection in the TD window these days?
Seems something big has changed in TD or the IDE that I missed ...
In other words Serial.begin() seems pointless ?
Code:
#include "Streaming.h"
#include "TeensyTimerTool.h"
using namespace TeensyTimerTool;
PeriodicTimer t1;
void setup(){
//Serial.begin(115200); // apparently not required ?!
// while (!Serial && millis() < 1000) // apparently not required ?!
Serial << "\n\n----- t4_PeriodicTimer.c -----\n";
Serial << "Flashing LED at 2Hz ... forever :-)\n";
pinMode(LED_BUILTIN,OUTPUT);
t1.begin(callback, 250'000); // triggers callback() every 250ms
Serial << "---------- setup done --------\n";
}
void loop(){
}
void callback(){
digitalWriteFast(LED_BUILTIN, !digitalReadFast(LED_BUILTIN));
}
and:
How does it know to use 115200 ?
Why don't I see the baud rate selection in the TD window these days?
Seems something big has changed in TD or the IDE that I missed ...