Skip to content

Commit cc9bba6

Browse files
committed
Added send example to example
1 parent 8f73f46 commit cc9bba6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/Websocket_Demo/Websocket_Demo.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <WebSocket.h>
1111

1212
byte mac[] = { 0x52, 0x4F, 0x43, 0x4B, 0x45, 0x54 };
13-
byte ip[] = { 10, 0, 1, 68 };
13+
byte ip[] = { 192, 168, 1 , 77 };
1414

1515
// Create a Websocket server
1616
WebSocket wsServer;
@@ -57,4 +57,8 @@ void loop() {
5757
wsServer.listen();
5858

5959
// Do other stuff here, but don't hang or cause long delays.
60+
delay(100);
61+
if (wsServer.isConnected()) {
62+
wsServer.send("abc123", 6);
63+
}
6064
}

0 commit comments

Comments
 (0)