5) Open Arduino Software and Click on file and then Preference and tick both of the Option “Compilation and Upload ” After writing your code  click on compile then you will get the Link of Your Hex file at the Output go to that place and get your Hex file