Yup all the above advice is correct. Glad you got it working! It's hard to find micro/nano sized ones without the CH340.
D3 is Digital 3, yes it needs a pass transistor, especially for the Micro/Nano boards as they can only source/sink ~7mA.
Set those two lines to "3" and "6" respectively for a 3s on 3s off test run. (I tested with a 5/10, 5/15, and 5/60 split to verify performance).
edit: you can set those two variables to whatever you want (in whole numbers under 32767) as long as you follow one condition:
timeperiod must be larger than ontime.
If you want precise timing, timeperiod should be the ontime plus the offtime.