第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

Nodemcu 不響應(yīng) http GET 請(qǐng)求

Nodemcu 不響應(yīng) http GET 請(qǐng)求

PHP
喵喵時(shí)光機(jī) 2021-10-15 10:10:48
我想從我的 nodemcu 向本地主機(jī)服務(wù)器發(fā)送 HTTP GET 請(qǐng)求。nodemcu 和我的筆記本電腦都連接到同一個(gè) Wifi 網(wǎng)絡(luò)。雖然 nodemcu 連接到網(wǎng)絡(luò),但它不會(huì)發(fā)送請(qǐng)求。我嘗試手動(dòng)發(fā)送請(qǐng)求并使用“郵遞員”,然后就可以了。所以我認(rèn)為問(wèn)題出在 nodemcu 代碼或設(shè)備上。歡迎任何想法。#include <ESP8266WiFi.h>#include <WiFiClient.h> #include <ESP8266WebServer.h>#include <ESP8266HTTPClient.h>/* Set these to your desired credentials. */const char *ssid = "******";  //ENTER YOUR WIFI SETTINGSconst char *password = "****";//Web/Server address to read/write from //website or IP address of server//=======================================================================//                    Power on setup//=======================================================================void setup() {  delay(1000);  Serial.begin(115200);  WiFi.mode(WIFI_OFF);        //Prevents reconnection issue (taking too long to connect)  delay(1000);  WiFi.mode(WIFI_STA);        //This line hides the viewing of ESP as wifi hotspot  WiFi.begin(ssid, password);     //Connect to your WiFi router  Serial.println("");  Serial.print("Connecting");  // Wait for connection  while (WiFi.status() != WL_CONNECTED) {    delay(500);    Serial.print(".");  }  //If connection successful show IP address in serial monitor  Serial.println("");  Serial.print("Connected to ");  Serial.println(ssid);  Serial.print("IP address: ");  Serial.println(WiFi.localIP());  //IP address assigned to your ESP}//=======================================================================//                    Main Program Loop//=======================================================================void loop() {  HTTPClient http;    //Declare object of class HTTPClient  String ADCData, station, getData, Link;  int adcvalue=253;  //Read Analog value of LDR  ADCData = String(adcvalue);   //String to interger conversion  station = "B";
查看完整描述

2 回答

?
POPMUISE

TA貢獻(xiàn)1765條經(jīng)驗(yàn) 獲得超5個(gè)贊

localhost 是“自我”的簡(jiǎn)寫。您告訴 NodeMCU 將請(qǐng)求發(fā)送給它自己,盡管它甚至可能不理解 localhost。您需要使用您嘗試向其發(fā)送請(qǐng)求的計(jì)算機(jī)的實(shí)際名稱或 IP 地址。Localhost 永遠(yuǎn)不會(huì)像您在此處嘗試使用它的方式工作(從一臺(tái)計(jì)算機(jī)向另一臺(tái)計(jì)算機(jī)發(fā)送請(qǐng)求)。


查看完整回答
反對(duì) 回復(fù) 2021-10-15
?
慕工程0101907

TA貢獻(xiàn)1887條經(jīng)驗(yàn) 獲得超5個(gè)贊

試試這個(gè):


<?php 


echo "<pre>";

print_r($_REQUEST);


?>


查看完整回答
反對(duì) 回復(fù) 2021-10-15
  • 2 回答
  • 0 關(guān)注
  • 239 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)