Skip to content

Commit

Permalink
add wifi
Browse files Browse the repository at this point in the history
  • Loading branch information
wemos committed Apr 12, 2022
1 parent ea28913 commit ac5526d
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions docs/en/tutorials/c3/get_started_with_arduino_c3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,56 @@ Upload Code
* Press **Button Reset**
* Release **Button 9** When you hear the prompt tone on usb reconnection

WIFI
-----------------
You need set WIFI Tx Power to 8.5dBm to use WIFI.

Use **WiFi.setTxPower(WIFI_POWER_8_5dBm)** after
**WiFi.begin()** or **WiFi.softAP()**

.. code-block:: arduino
WiFi.begin(ssid, password);
WiFi.setTxPower(WIFI_POWER_8_5dBm);
.. code-block:: arduino
WiFi.softAP(ssid, password);
WiFi.setTxPower(WIFI_POWER_8_5dBm);
**simple test:**

.. code-block:: arduino
#include <WiFi.h>
const char* ssid = "yourssid";
const char* password = "yourpasswd";
void setup() {
Serial.begin(115200);
delay(1000);
Serial.println("Connecting...");
WiFi.mode(WIFI_STA);
WiFi.disconnect();
WiFi.begin(ssid, password);
WiFi.setTxPower(WIFI_POWER_8_5dBm);
while (WiFi.status() != WL_CONNECTED){
Serial.print(".");
delay(500);
}
Serial.println("Connected");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
}
Documentation
-------------------------
* `ESP32-S2 and ESP32-C3 Support <https://github.com/espressif/arduino-esp32#esp32-s2-and-esp32-c3-support>`_
Expand Down

0 comments on commit ac5526d

Please sign in to comment.