如何使用ESP8266在异步网络服务器上显示文本文件
我的SD卡上有几个TXT文件,我想将其输出到异步网络服务器。我为此使用了ESP8266。 我尝试了以下电话。但是,然后显示错误。 它还说发现了两个SD.H库:
Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/SD
/Applications/Arduino.app/Contents/Java/libraries/SD
未使用后者。
我得到的错误如下:
no matching function for call to 'AsyncWebServerRequest::send(SDClass&, const char [12], const char [10])'
如何解决此问题?
server.on("/getdata", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(SD, "/subj1_1.txt", "text/plain");
});
I have several txt files on my SD card that I would like to output to my async webserver. I use the ESP8266 for this.
I have tried it with the following call. However, an error is then displayed.
It also says that two SD.h libraries were found:
Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/SD
/Applications/Arduino.app/Contents/Java/libraries/SD
the latter is not used.
The error I get is the following:
no matching function for call to 'AsyncWebServerRequest::send(SDClass&, const char [12], const char [10])'
how can I solve this problem?
server.on("/getdata", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(SD, "/subj1_1.txt", "text/plain");
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论