Arduino IDE for ESP8266 Tutorial (iv) Web control Light Simple page

Source: Internet
Author: User

Modify the SSID and passwd, the program burned to 8266, waiting for the serial port to return the successful connection message, after the successful connection can see the return of an IP address, using the browser azimuth this IP address can see this message:

After connecting the router, return the IP address 192.168.1.104

The phone is connected to the same router, enter 192.168.1.104, get (for, the IP address can be replaced)

This is the string returned to the browser in Handlemain.

You can then access the address of the control pin:

Visit these two addresses separately to see the on-board LEDs lit and off. This is the function that binds the/pin. Note that only get is allowed to make requests here, because at the time of binding there is more than one http_get parameter, which means that only the GET request is bound, and the same can bind a request such as post.

Because 8266 is a single-threaded operation, there is no advantage in the socket request, and when multiple clients request at the same time can cause data dislocation, and so on, so people usually use the form of HTTP request to do data interaction.

Arduino IDE for ESP8266 Tutorial (iv) Web control Light Simple page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.