When the esp8266 is connected to the usb uart and I select generic 8266 under boards and select the appropriate port I get this message at the bottom of the ide
what are you trying to upload in Arduino IDE regarding the ESP? You need a separate program to flash the AT instruction firmware not the Arduino IDE.
Also, your sketch looks like its using Ethernet as a connection method. This won’t work with the ESP.
Here is another post with steps how to setup the Uno and ESP8266 in addition to the link @adam provided.
Good luck & let us know how it goes.