Can an arduino perform this task (pulse counter) ?

I have compiled and uploaded the code for post #48 into the CYD.

I have changed the update from 100 ms to 1000 ms just so there would be fewer lines printed to the serial monitor.

In regard to the serial monitor, I note that the code shows that there should be some lines printed initially in the setup part of the code:

Serial.printf("\n\nESP32 frequency running average - measure pin %d pulse information \n", risePin);
Serial.println("timerBegin Failed!!");
Serial.print("timerBegin() OK frequenmcy ");
Serial.println(timerGetFrequency(Timer1_Cfg));
Serial.println("displaying results");

I am not seeing those lines printed to the serial monitor.

I am seeing the line being printed in the loop part of the code.

edit: apparently it has been seen before that serial print inside setup is not working or seen. The following code has been suggested and has been seen to work:

Serial.begin(115200);
while (!Serial && (millis() < 5000)) ;
delay(1000);

but I’ve added it and still not seeing the lines being printed.

But changing the delay(1000) to delay(5000) does work - I see the serial.print lines. The while(serial) line apparently does nothing.