zl程序教程

您现在的位置是:首页 >  其它

当前栏目

esp01s初识

初识
2023-06-13 09:16:59 时间

`#include

include

ESP8266WebServer esp8266_sever(80); const char* ssid="test"; const char* passwd="12345678"; void ROOT(void) { esp8266_sever.send(200,"text/plain","hahahahah"); } void notroot(void) { esp8266_sever.send(200,"text/plain","not found"); } void setup() { Serial.begin(9600); WiFi.softAP(ssid,passwd); Serial.print(WiFi.localIP()); esp8266_sever.begin(); esp8266_sever.on("/",ROOT); esp8266_sever.onNotFound(notroot); Serial.print("OK");

}

void loop() { esp8266_sever.handleClient();

}`