ESP8266-01 - USB-Stick Eng
ESP8266-01 - USB-Stick Eng
And thank you for purchasing our AZ-Delivery ESP8266-01. On the following
pages, we will go together with you through the first steps of the programming.
Enjoy!
The ESP8622-01 has a wide range, thanks to its WLAN 802.11 b/g/n standard and can
be used universally. The module supports three operating modes:
WLAN Router (AP), WLAN Client (STA), and both at the same time (AP + STA)! The
powerful 80MHz processor and 1MB memory make the ESP8266-01 suitable for many
applications. It is limited in contrast to its big brother (ESP8266-12E) by 2 GPIO pins.
https://sparks.gogo.co.nz/
ch340.html
Preparing the software:
In this step we see the Arduino-IDE software as installed, if that is not the case with you,
you can always download it at https://www.arduino.cc/en/Main/Software# and install it on
your PC. In addition, the drivers for the CH340 should have already been installed, if they
are not, you can get the drivers here from us: CH340. this is not a link
After all basic requirements have been met, we can now start with the installation of the
software. First of all, the Arduino-IDE software needs all the information about the
ESP8266- 01S. We can do that by entering the following address under "Preferences" >
"Additional Board Administrator URLs":
http://arduino.esp8266.com/stable/package_esp8266com_index.json
If you have already entered a link, click on the button and add a new line in the
window.
Confirm the entry with "OK".
When that is completed, go to "Tools" > "Board" > "Board Administrator" and install
the ESP8266 library. In the board manager, enter "ESP8266" in the search bar, which is
located at the top right, and then the package of ESP8266 Community will be displayed.
Select this package and then click on Install.
If the installation had been successful, then next to the package INSTALLED will appear.
The next step is to select the correct board:
Under Tools >
Board: „Generic ESP8266 Module“
Port: “COMxx” (here is your port of the serial adapter)
With that, all of the basic settings have been made, and now it is time for the wiring. To be
able to program the ESP8266-01, firstly, it needs to be set to the programming mode.
Wiring the module with the serial adapter:
GPIO0
GPIO02 must be grounded while booting, in order to allow the chip to enter programming mode.
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() { digitalWrite
(LED_BUILTIN, HIGH);
delay(1000); digitalWrite
(LED_BUILTIN, LOW);
delay(1000);
}
If the LED with "LED_BUILTIN" does not flash, you have to replace LED_BUILTIN with
port 1 and try again:
the used chip is the esp8266EX. I used
port 2 instead of buildin or 1.
void setup() {
After you programmed it, remove the item
pinMode(1, OUTPUT);
} from the USB port and reinsert it. Then it
void loop() { will flash.
digitalWrite (1,
HIGH); delay(1000);
digitalWrite (1,
LOW); delay(1000);
}
.
After we have opened or changed the code, we click above on and verify our program:
If everything is correct and our program contains no errors,
Then simply disconnect the power supply, for a brief moment, and then reconnect or reset it
GPIO0 is grounded.
again and check whether the GPIO02
After the programming process, as already mentioned, disconnect again the light blue
marked cables! and remove and reinsert the usb.
Now the LED will flash every second, but this is only a small part of what your ESP8266-01
can do.
Using the ESP8266-01 as a WLAN module for the Atmega328P Board
Basics of communication via AT commands
The AZ-Delivery esp8266 WLAN module comes preinstalled with firmware that allows the
connected devices, such as an Mikrocontroller Board, to communicate with it via AT
commands. The AT instruction set is relatively old (~ 30 years) and was originally developed
for communication with modems.
However, its simplicity and economy of resources make it ideal for communication with the
ESP8266-01.
All AT commands begin with "AT+" followed by the actual command. It is also important
that all AT commands end with a line break (CR and NL). For this reason, if you send a
command over the serial connection between ESP8266 and Atmega328P Board, you should
always use println, so that the line break is sent and the module is told to execute the
command.
The AT commands can be found in the datasheet of ESPRESSIF:
https://www.espressif.com/sites/default/files/documentation/4a-
esp8266_at_instruction_set_en.pdf
Download a Website
In this example, we would like to inform AZ-Delivery ESP8266 -01 about AT commands
that allow the download of a website. To do this, the WLAN module must first be set to
"WLAN Client" mode via the AT + CWMODE = 1 command. Then it can be connected to a
Wi-Fi network via AT + CWJAP = "SSID", "Password".
Now you can use AT + CIPSTART = "TCP", "website.de", 80 to connect to the target
server. Then you have to inform the Wi-Fi module via AT + CIPSEND = NUMBER, how
long the request is, which you want to send to the server. You still have to add a few
characters, because the line breaks have to be counted at the end.
Due to the complexity of this procedure, it should first be carried out on a PC via the serial
console, before translating the procedure into the Arduino-IDE code, otherwise,
troubleshooting will be very difficult.
You did it! Now you can program and actualize your
own projects with the ESP8266-01!
Now it is time for experimenting!
And for more hardware our online store is always at your disposal:
https://az-delivery.de
Enjoy!
Imprint
https://az-delivery.de/pages/about-us