Revert "Revert "changed of statement""

This reverts commit d84e8fc0137cfb36eabaf0204ad27c3692f4630c.
Added control of LED

Added led PWm control
shortend time to 10 ms rather than 1000 ms