imported original led.c example after clean up