Arduino Thread is done without testing