That has nothing to do with the code. That is a failure of the PC to communicate with the Uno. Make sure that the right board and port are selected in the IDE Tools menu. Try a different USB cable.
That has nothing to do with the code. That is a failure of the PC to communicate with the Uno. Make sure that the right board and port are selected in the IDE Tools menu. Try a different USB cable.