5637| 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怎么获取啊? |
在Processing自动获取的lib管理器里面没有找到这个hypermedia的东东 |
© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed