Strange Oscilloscope Reading on Nano

Hi guys, so as you remember I had an analog input and a digital input.
The analog input/duty pulse output ran fine.

Then I put code just for digital input/digital output.

I asked it to double the frequency. Tried from 5hz to 30hz. It would not do it.
Put out exactly same frequency as input.
I asked for 4v output to overide noise. It kept the same tiny voltage.

I thought I was on a roll since I had the analog success, but no.
Is the Hz range OK?
Or what could it be?
Seems like the oscope is pretty ironed out.
I tried several codes. Honestly I get them from Controllino. It has made some good codes for me before