Skip to content

Commit 77b61d1

Browse files
committed
example astyle
1 parent 4c4288b commit 77b61d1

File tree

1 file changed

+3
-40
lines changed
  • libraries/ESP8266WiFi/examples/udp

1 file changed

+3
-40
lines changed

libraries/ESP8266WiFi/examples/udp/udp.ino

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -73,45 +73,8 @@ void loop() {
7373
delay(10);
7474
}
7575

76-
7776
/*
78-
Processing sketch to run with this example
79-
=====================================================
80-
81-
// Processing UDP example to send and receive string data from Arduino
82-
// press any key to send the "Hello Arduino" message
83-
84-
85-
import hypermedia.net.*;
86-
87-
UDP udp; // define the UDP object
88-
89-
90-
void setup() {
91-
udp = new UDP( this, 6000 ); // create a new datagram connection on port 6000
92-
//udp.log( true ); // <-- printout the connection activity
93-
udp.listen( true ); // and wait for incoming message
94-
}
95-
96-
void draw()
97-
{
98-
}
99-
100-
void keyPressed() {
101-
String ip = "192.168.1.177"; // the remote IP address
102-
int port = 8888; // the destination port
103-
104-
udp.send("Hello World", ip, port ); // the message to send
105-
106-
}
107-
108-
void receive( byte[] data ) { // <-- default handler
109-
//void receive( byte[] data, String ip, int port ) { // <-- extended handler
110-
111-
for(int i=0; i < data.length; i++)
112-
print(char(data[i]));
113-
println();
114-
}
77+
test (shell/netcat):
78+
---------------
79+
nc -u 192.168.esp.address 8888
11580
*/
116-
117-

0 commit comments

Comments
 (0)