![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ESP8266
Tsai时越
记录计算机技术学习与分享
展开
-
ESP8266 使用TCP通信协议
TCP服务器示例 #include <ESP8266WiFi.h> int port = 8888; //Port number WiFiServer server(port); //Server connect to WiFi Network const char *ssid = "xx"; //Enter your wifi SSID const char *password = "xx"; //Enter your wifi Password int cou原创 2020-10-12 11:46:59 · 4518 阅读 · 2 评论 -
ESP8266 html页面手机适配方法
在head中添加<meta charset=\"utf-8\" <meta name=\"viewport\" content=\"width=device-width, height=400px,initial-scale=2.0, maximum-scale=2.0," "minimum-scale=2.0, user-scalable=no\"/>"viewport :用户网页的可视区域. width:控制viewport的大小,可以指定一个值,如600,或..原创 2020-09-03 16:59:54 · 242 阅读 · 0 评论 -
ESP8266 WiFiManager库 一键配网
#include <ESP8266WiFi.h>#include <DNSServer.h>#include <ESP8266WebServer.h>#include <WiFiManager.h>//开启服务器端口WiFiServer server(80);String header;String output5State = "off";String output4State = "off";const int output5 .原创 2020-08-21 14:45:47 · 2876 阅读 · 2 评论 -
ESP8266 POST请求
#include <ESP8266WiFi.h>#include <ESP8266HTTPClient.h>#include <WiFiClient.h>//配置wifi和密码const char* ssid = "";const char* password = "";//访问的urlString url = "";//延迟时间unsigned long lastTime = 0;unsigned long timerDelay = 5000.原创 2020-08-21 14:44:02 · 3425 阅读 · 0 评论 -
ESP8266 GET请求
#include <ESP8266WiFi.h>#include <ESP8266HTTPClient.h>#include <WiFiClient.h>const char* ssid = "";const char* password = "";String url = "";//设置延迟时间unsigned long lastTime = 0;unsigned long timerDelay = 5000;void setup() {..原创 2020-08-21 14:37:23 · 2735 阅读 · 0 评论 -
ESP8266 MQTT服务端
// mqtt + 8266#include <ESP8266WiFi.h>#include <PubSubClient.h>#define ssid "" // wifi名称#define password "" // wifi密码#define mqtt_server "192.168.0.113" // mqtt服务器地址,如本地ip192.168.31.22#define mqtt_user "user1"//MQTT 用户名#define m..原创 2020-08-20 10:16:55 · 900 阅读 · 0 评论