极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9683|回复: 0

enc28j60 模块向网站get数据的demo

[复制链接]
发表于 2014-12-8 22:25:25 | 显示全部楼层 |阅读模式
本帖最后由 airtcp 于 2014-12-8 22:29 编辑

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


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

  3.   if (millis() > timer) {
  4.     timer = millis() + 10000;

  5.     byte sd = stash.create();
  6.     stash.print("variable=");
  7.     stash.print(VARIABLE);
  8.     stash.print("&action=Submit");
  9.     stash.save();

  10.     Stash::prepare(PSTR("GET receiveData.aspx?name=wendu&value=12&userkey=wojiushiwo&uint=aa HTTP/1.0" "\r\n"
  11.     "Host: $F" "\r\n" "\r\n"),
  12.      website);
  13.     // send the packet - this also releases all stash buffers once done
  14.     ether.tcpSend();
  15.   }
  16. }
复制代码

这是我loop里面的方法。求各位大神指点
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|联系我们|极客工坊

GMT+8, 2026-6-17 00:39 , Processed in 0.046986 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表