4461浏览
查看: 4461|回复: 2

关于EthernetShield的问题

[复制链接]
最近买了一块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怎么获取啊?



wanglei830205  初级技师
 楼主|

发表于 2015-4-14 21:26:46

在Processing自动获取的lib管理器里面没有找到这个hypermedia的东东
回复

使用道具 举报

Cain  初级技匠

发表于 2015-4-20 11:22:25

回帖奖励 +1 创造力

见附件

udp.zip

41.06 KB, 下载次数: 283

回复

使用道具 举报

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

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail