fixed sleep bug

added sleep 2 to every new action to allow the serial port connection
to be created