Sqare wave short time

Hello, i neet to build a project with arduino that output sqare wave from 17 Hz to 170 HZ in a preset time( between 1- 3s).i want to read on a display frequency and RPM.
Thanks in advance.

Look up blink without delay. Generating the 2 frequencies concurrently is pretty easy.