User manual

permits control of an LED. The setup picture also shows how to connect an exter-
nal power supply to the board. As an alternative to
this kind of power supply, you can also use a
power bank (an external rechargeable battery,
usually for Smartphones), which can supply the
board easily via the micro-USB connection.
How to connect the battery to the test setup.
The program
The program sends a slightly more complex page than the previous experiment.
You can also switch the LED at pin D9 by entering /LED after the IP of the module.
The current condition of the LED is then inverted, i.e. the condition will toggle each
time.
Enter the WLAN data and upload the program. The board's IP is displayed in seri-
al mode. Then you can open the browser and call the board's IP. The website now
has a headline and a little more text. The text indicates how to control the LED.
This gives you the first fully automated web server.
void loop() {
if (esp8266.available()) // check if the esp is sending a message
{
Required parts
1 x pinboard, 1 x NanoESP, 1 x 9-V-clip, 1 x LED (red), 1
x resistor 1 kOhm (brown-black-red), circuit wire, 1 x 9-V-
battery (not enclosed in the learning package)