Added led control to the acquisition code