我将Arduino Mega作为带有RTC,麦克风和SD卡的数据 Logger 运行 .
我想用ESP8266作为网络服务器远程访问SD卡数据 . 将ESP8266与Arduino板作为网络服务器连接的最佳方法是什么?

我有一个想法是从nodeMCU在ESP8266上运行以下脚本

-- a simple http server
srv = net.createServer(net.TCP)
srv:listen(80, function(conn)
 conn:on("receive", function(sck, payload)
    print(payload)
    sck:send("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n<h1> Hello,     NodeMCU.</h1>")
 end)
 conn:on("sent", function(sck) sck:close() end)
end)

并在 sck:send 之前插入一条线以触发Arduino板上的中断并让它从SD卡发送数据 .
有没有更简单的方法来做到这一点?还有其他想法吗?
ESP8266正在运行nodeMCU,但我愿意在其上使用其他代码 .
(我看到很多有关ESP8266编程的教程,但是在连接到Arduino板时却没有 . )