I am new to Teensy board. I was trying to run my first code to count the number of samples per second . the same code ran very well on ESP8266 but nothing on the Teensy board.
HTML:
unsigned long startTime;
uint32_t helloWorldCount = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115000);
startTime = millis();
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("hello, world");
helloWorldCount++;
if (millis() - startTime >1000){
Serial.print("printed per second: ");
Serial.println(helloWorldCount);
startTime = millis();
helloWorldCount = 0;
}
}
HTML:
hello, world
hello, world
hello, world
printed per second: 823
hello, world
hello, world
hello, world