Thank you very much for the hints and for the code which - by the way - works perfectly fine. I would like us to break it down a bit for me to understand the details. Firstly, I noticed that you have only indicated pin #9 as an output using pinMode (myOutputPin, OUTPUT) but I don't see how you forward the generated signal to this output pin. What if we need to send it to pin #9? (I changed 9 to 10 but it didn't work. Is Timer 1 bound to pin #9?) This is OC1A - isn't it?
Additionally, why it is ok to remove the line TIMSK1 |= (1 << OCIE1A) from my code? I mean, the goal here is to enable the timer/counter interrupt mask register (TIMSK1) so as to enable timer interrupts and this is the point of that line.