Class rewritten to take in account the changes wanted by M. Caprara. Now everything should be working.

If the serial connection is not openend, the thread waits for its opening