Added led control and nanosleep