/*
Basic AT Commands - Check Mode
Use the serial monitor to interface with the AT commands!
https://www.instructables.com/Getting-Started-With-the-ESP8266-ESP-01/
https://www.pridopia.co.uk/pi-doc/ESP8266ATCommandsSet.pdf
If you want to check what mode your Wi-Fi module is in,
you can simply type the following command:
> AT+CWMODE?
This will display a number (1, 2, or 3) associated with
the corresponding mode of operation.
Once we have the ESP-01 operating in STA mode,
we need to connect to a Wi-Fi network.
First we can check if we are already connected to one by sending the command:
> AT+CIFSR
This will display the station IP address of our ESP-01 module.
If you don’t get an IP address after entering the previous command,
use the following command to connect to your network:
> AT+CWJAP="Wokwi-GUEST",""
Type the name of your Wi-Fi network and the password to connect to it.
Make sure you include the quotation marks.
After a couple of seconds, you should get an "OK" response.
You can check again to see if you have an IP address using the AT+CIFSR command.
Then we need to enable multiple connections before we can configure the ESP8266 ESP-01 module as a server. Type the next command:
> AT+CIPMUX=1
Once again, each number is associated with a type of connection:
Single = 0
Multiple = 1
The following step is to start the server at port 80:
> AT+CIPSERVER=1,80
The first number is used to indicate whether we want
to close server mode (0), or open server mode (1).
The second number indicates the port that the client uses to connect to a server.
We chose port 80 because this is the default port for HTTP protocol.
*/
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Loading
esp-01
esp-01