Creating my own PWM

Thanks!!

I removed the serial read, and used a voltmeter to meassure the ouput, I got close results, Which I guess are dur to Voltage lost in the capacitor.