Closed loop control with LEDs on FPGA