user68466: If I am programming an arduino and I wanted to communicate with the internet thru the esp2866 then is AT command the only thing that I can do?
I see a lot of this in the web
void loop() {
 valSensor = getSensorData();
 String getData = "GET /update?api_key="+ API +"&"+ field +"="+String(valSensor);
sendCommand("AT+CIPMUX=1",5,"OK");
 sendCommand("AT+CIPSTART=0,\"TCP\",\""+ HOST +"\","+ PORT,15,"OK");
 sendCommand("AT+CIPSEND=0," +String(getData.length()+4),4,">");
 esp8266.println(getData);delay(1500);countTrueCommand++;
 sendCommand("AT+CIPCLOSE=0",5,"OK");
}

If I set my Board -> Arduino Uno, I was thinking I can use the following library https://arduino-esp8266.readthedocs.io/en/2.7.4_a/esp8266wifi/readme.html
#include <ESP8266WiFi.h>
 
const char* ssid     = "my-ssid";
const char* password = "my-password";
 

void setup() {
  Serial.begin(115200);
  // We start by connecting to a WiFi network
 
  Serial.println();
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);
  
  WiFi.begin(ssid, password);
  
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

But I am getting
exit status 1
ESP8266WiFi.h: No such file or directory

Looks like the following library is only available when you set the Board-> Generic ESP8266 Module and is only used when you want to program the ESP8266 in the Arduino IDE?  Is this correct?
So in my question, does it mean that to communicate from the Arduino into the internet, I will be sending the AT command and communicate thru the SoftwareSerial.h?

user4143: 
is AT command the only thing that I can do?

No. The AT commands are provided by the AT command firmware. You can replace that firmware with whatever you want.
It is common to write your own software for the ESP8266 to do your communication for you and communicate with other devices (including an Arduino) in whatever way is suitable.
Many times you don't even need the Arduino any more as the ESP8266 can do everything (it struggles with analog signals as there is only one rather inferior ADC pin).

Looks like the following library is only available when you set the Board-> Generic ESP8266 Module and is only used when you want to program the ESP8266 in the Arduino IDE? Is this correct?

That is correct. That is for when you are writing your own ESP8266 firmware to replace the AT firmware.

So in my question, does it mean that to communicate from the Arduino into the internet, I will be sending the AT command and communicate thru the SoftwareSerial.h?

Only if you retain the AT firmware on the ESP8266. To be honest that firmware is terrible and all the tutorials are bad. You should at the first available opportunity learn to program the ESP8266 directly and maybe retire the Arduino unless you need to use it as a glorified IO expander.

68466: <p>If I am programming an arduino and I wanted to communicate with the internet thru the esp2866 then is AT command the only thing that I can do?</p>
<p>I see a lot of this in the web</p>
<pre><code>void loop() {
 valSensor = getSensorData();
 String getData = &quot;GET /update?api_key=&quot;+ API +&quot;&amp;&quot;+ field +&quot;=&quot;+String(valSensor);
sendCommand(&quot;AT+CIPMUX=1&quot;,5,&quot;OK&quot;);
 sendCommand(&quot;AT+CIPSTART=0,\&quot;TCP\&quot;,\&quot;&quot;+ HOST +&quot;\&quot;,&quot;+ PORT,15,&quot;OK&quot;);
 sendCommand(&quot;AT+CIPSEND=0,&quot; +String(getData.length()+4),4,&quot;&gt;&quot;);
 esp8266.println(getData);delay(1500);countTrueCommand++;
 sendCommand(&quot;AT+CIPCLOSE=0&quot;,5,&quot;OK&quot;);
}
</code></pre>
<p>If I set my Board -&gt; Arduino Uno, I was thinking I can use the following library <a href="https://arduino-esp8266.readthedocs.io/en/2.7.4_a/esp8266wifi/readme.html" rel="nofollow noreferrer">https://arduino-esp8266.readthedocs.io/en/2.7.4_a/esp8266wifi/readme.html</a></p>
<pre><code>#include &lt;ESP8266WiFi.h&gt;
 
const char* ssid     = &quot;my-ssid&quot;;
const char* password = &quot;my-password&quot;;
 

void setup() {
  Serial.begin(115200);
  // We start by connecting to a WiFi network
 
  Serial.println();
  Serial.println();
  Serial.print(&quot;Connecting to &quot;);
  Serial.println(ssid);
  
  WiFi.begin(ssid, password);
  
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(&quot;.&quot;);
  }
</code></pre>
<p>But I am getting</p>
<pre><code>exit status 1
ESP8266WiFi.h: No such file or directory
</code></pre>
<p>Looks like the following library is only available when you set the Board-&gt; Generic ESP8266 Module and is only used when you want to program the ESP8266 in the Arduino IDE?  Is this correct?</p>
<p>So in my question, does it mean that to communicate from the Arduino into the internet, I will be sending the AT command and communicate thru the SoftwareSerial.h?</p>
 4143: <blockquote>
<p>is AT command the only thing that I can do?</p>
</blockquote>
<p>No. The AT commands are provided by the AT command firmware. You can replace that firmware with whatever you want.</p>
<p>It is common to write your own software for the ESP8266 to do your communication for you and communicate with other devices (including an Arduino) in whatever way is suitable.</p>
<p>Many times you don't even need the Arduino any more as the ESP8266 can do everything (it struggles with analog signals as there is only one rather inferior ADC pin).</p>
<blockquote>
<p>Looks like the following library is only available when you set the Board-&gt; Generic ESP8266 Module and is only used when you want to program the ESP8266 in the Arduino IDE? Is this correct?</p>
</blockquote>
<p>That is correct. That is for when you are writing your own ESP8266 firmware to replace the AT firmware.</p>
<blockquote>
<p>So in my question, does it mean that to communicate from the Arduino into the internet, I will be sending the AT command and communicate thru the SoftwareSerial.h?</p>
</blockquote>
<p>Only if you retain the AT firmware on the ESP8266. To be honest that firmware is terrible and all the tutorials are bad. You should at the first available opportunity learn to program the ESP8266 directly and maybe retire the Arduino unless you need to use it as a glorified IO expander.</p>
