NodeMCU-ESP32 development example-WiFi connection setting static IP

WiFi connection setting static IP

NodeMCU-32S The strongest ESP32 development board Non-pirated or sub-factory CH340 WiFi Bluetooth ESP-32 Arduino IDE available

ESP32-S is a general-purpose WiFi-BT-BLE MCU module with powerful functions and a wide range of uses. It can be used for low-power sensor networks and demanding tasks, such as voice encoding, audio streaming, and MP3 decoding.

The core of this module is the ESP32 chip, which is scalable and adaptive. The two CPU cores can be individually controlled or powered on. The adjustment range of the clock frequency is from 80 MHz to 240 MHz. The user can cut off the power of the CPU and use the low-power coprocessor to continuously monitor the status changes of the peripherals or whether certain analog quantities exceed the threshold. ESP32 also integrates a wealth of peripherals, including capacitive touch sensors, Hall sensors, low-noise sensor amplifiers, SD card interface, Ethernet interface, high-speed SDIO/SPI, UART, I2S and I2C, etc. The following will explain in detail the environment setup for developing ESP32 using Arduino IDE.

This article will introduce how to set a static/fixed IP address for the ESP32 board. If you use ESP32 to run a web server or Wi-Fi client, and every time you restart the development board, it has a new IP address.

1. Prepare the hardware

  • One NodeMCU-ESP32s development board
  • One data line
  • A laptop

It is assumed that the WiFi network has been set up through the router and can be accessed. The NodeMCU-ESP32s development board is connected to the computer through a data cable.

2. Software preparation

  • Arudino IDE and ESP32 plug-in

3. Code implementation

#include <WiFi.h>
const char* ssid = "WIFI名称&#

Guess you like

Origin blog.csdn.net/wujuxKkoolerter/article/details/114240110