我尝试用 esp8266 做一个时钟新闻天气滚动字幕。但是当我上传代码时出现错误。你能帮助我吗?这是代码的一部分:(根据 MIT 许可证(版权所有 2018 David Payne))
void PiHoleClient::getPiHoleData(String server, int port) {
errorMessage = "";
String response = "";
String apiGetData = "http://" + server + ":" + String(port) + "/admin/api.php?summary";
Serial.println("Sending: " + apiGetData);
HTTPClient http; //Object of class HTTPClient
http.begin(apiGetData);// get the result (**the error code**)
int httpCode = http.GET();
//Check the returning code
if (httpCode > 0) {
response = http.getString();
http.end(); //Close connection
if (httpCode != 200) {
// Bad Response Code
errorMessage = …Run Code Online (Sandbox Code Playgroud)