前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Arduino+w5100使用2:WebClient

Arduino+w5100使用2:WebClient

作者头像
用户1733354
发布2018-05-22 15:12:16
1.1K0
发布2018-05-22 15:12:16
举报

操作步骤

注:服务器端网址为http://www.ivt.edu.cn/english/sub/pub.html

1.将网络扩展板与UNO插接在一起,确保引脚连接正常。

pic1:uno+w5100 shield

2.如图所示连接UNO和PC机(PWR红灯长亮,AREF左侧绿灯长亮)

pic2:connect uno and pc

3.打开arduino示例程序WebClient

pic3-1:WebClient

修改代码如下图(红色划线部分为你要访问的服务器的信息),并上传到uno板

pic3-2:WebClient-code

上图中蓝色划线部分(Client端w5100的IP地址一定要和路由器在同一个网段),下图是在当前路由器下的另外电脑信息,可以确认路由器网段

pic3-3:router

4.将网络扩展板使用网线(网线用交叉线)与路由器连接

pic4:crossover cable

5.打开arduino菜单:工具-》串口监视器

pic5:arduino serial

6.代码解释

设置w5100为客户端,http://www.ivt.edu.cn/english/sub/pub.html为服务器端,会读取服务器信息(client.read())显示在端口监视器中。


网上参考资料

Getting Data From The Web – Arduino + Ethernet

Arduino Ethernet Shield and external webserver

Tutorials > Examples from Libraries > Ethernet > WebClient

Tutorials > Examples from Libraries > Ethernet > WebClientRepeating

Web Client—POST example below for dhcp and domain name.

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2016.01.20 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档