pwm function implemented
use pwm for analogWrite
refactoring: use delayMicroseconds
delayMicroseconds refactored
analogWrite used