wanglei830205 发表于 2015-4-18 22:06:27

关于Arduino的EthernetShield和Processing的问题

最近买了一块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/udp/documentation/java/hypermedia/...”

小飞 发表于 2016-5-19 09:04:17

你好 请问你那个库找到了吗 能不能分享一下 我最近打不开那个连接
页: [1]
查看完整版本: 关于Arduino的EthernetShield和Processing的问题