added software pwm
trying to make pwm periodical