Added a basic WiFi UDP client example (#114)

* Added a basic WiFi UDP client example: a sketch that sends random bytes over udp.

* Updated udp example and included Python and Ruby UDP servers.
This commit is contained in:
Joren Six
2017-02-03 15:31:41 +01:00
committed by Me No Dev
parent de017a8a1b
commit 97e9a120bd
3 changed files with 121 additions and 0 deletions

View File

@ -0,0 +1,16 @@
# This ruby script listens on UDP port 3333
# for messages from the ESP32 board and prints them
require 'socket'
include Socket::Constants
udp_socket = UDPSocket.new(AF_INET)
#bind
udp_socket.bind("", 3333)
puts 'Server listening'
while true do
message, sender = udp_socket.recvfrom(1024)
puts message
end