Skip to content

Instantly share code, notes, and snippets.

@boochow
Last active November 23, 2017 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boochow/71777b9b8d704e0e52ef1db973482a2c to your computer and use it in GitHub Desktop.
Save boochow/71777b9b8d704e0e52ef1db973482a2c to your computer and use it in GitHub Desktop.
def main():
import network, socket
from machine import Pin
nic = network.WIZNET5K(pyb.SPI(2), Pin('PB12'), Pin('PC8'))
addr = socket.getaddrinfo('towel.blinkenlights.nl', 23)[0][-1]
s = socket.socket()
s.connect(addr)
while True:
data = s.recv(1500)
print(data.decode('utf-8'), end='')
@boochow
Copy link
Author

boochow commented Oct 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment