Analog output now works, still missing the output_loop thread.