airtcp 发表于 2014-12-8 22:25:25

enc28j60 模块向网站get数据的demo

本帖最后由 airtcp 于 2014-12-8 22:29 编辑

各位大神我看了很多文档 找了很多资料就是get不了数据,比如我要get的数据格式是这样的http://localhost:5449/receiveData.aspx?name=wendu&value=12&userkey=wojiushiwo&uint=aaname是温度 value是值 等等,只要打开这个网址,我的网站就会记录到这条数据。求各位大神指点 库已经下好了是EtherCard.h库


void loop () {
ether.packetLoop(ether.packetReceive());

if (millis() > timer) {
    timer = millis() + 10000;

    byte sd = stash.create();
    stash.print("variable=");
    stash.print(VARIABLE);
    stash.print("&action=Submit");
    stash.save();

    Stash::prepare(PSTR("GET receiveData.aspx?name=wendu&value=12&userkey=wojiushiwo&uint=aa HTTP/1.0" "\r\n"
    "Host: $F" "\r\n" "\r\n"),
   website);
    // send the packet - this also releases all stash buffers once done
    ether.tcpSend();
}
}
这是我loop里面的方法。求各位大神指点
页: [1]
查看完整版本: enc28j60 模块向网站get数据的demo