极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 12369|回复: 2

关于Arduino的EthernetShield和Processing的问题

[复制链接]
发表于 2015-4-18 22:06:27 | 显示全部楼层 |阅读模式
最近买了一块EthernetShield盾板,然后直接参考例程UDPSendReceive.pde:



其中有一段与Processing互动的代码如下(在processing中编译):
/*
  Processing sketch to run with this example
=====================================================
*/
// Processing UDP example to send and receive string data from Arduino
// press any key to send the "Hello Arduino" message


// import hypermedia.net.*;

UDP udp;  // define the UDP object


void setup() {
udp = new UDP( this, 6000 );  // create a new datagram connection on port 6000
//udp.log( true );         // <-- printout the connection activity
udp.listen( true );           // and wait for incoming message  
}

void draw()
{
}

void keyPressed() {
String ip       = "192.168.1.177"; // the remote IP address
int port        = 8888;        // the destination port

udp.send("Hello World", ip, port );   // the message to send

}

void receive( byte[] data ) {          // <-- default handler
//void receive( byte[] data, String ip, int port ) {   // <-- extended handler

for(int i=0; i < data.length; i++)
print(char(data));  
println();   
}


在processing中编译通不过,No library found for hypermedia.net
Libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder.

哪位朋友知道hypermedia.net怎么获取啊?
在Processing自动获取的lib管理器里面没有找到这个hypermedia的东东
回复

使用道具 举报

发表于 2015-4-19 06:51:25 | 显示全部楼层
bing 中搜一下“hypermedia.net”
得到“www.ubaa.net/shared/processing/u ... java/hypermedia/...
回复 支持 反对

使用道具 举报

发表于 2016-5-19 09:04:17 | 显示全部楼层
你好 请问你那个库找到了吗 能不能分享一下 我最近打不开那个连接
回复 支持 反对

使用道具 举报

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

本版积分规则 需要先绑定手机号

Archiver|联系我们|极客工坊

GMT+8, 2024-4-19 02:01 , Processed in 0.048111 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

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