Thank you for being so cooperative and helpful with info.
You would be wise to learn how to put your code in code tags.
That is not a issue with your sketch but a possible issue with your microcontroller board or not selecting the correct board or a whole host of other things.
Can you post that image of your setup and let us know which board you are using?