Last active
November 23, 2017 00:54
-
-
Save boochow/71777b9b8d704e0e52ef1db973482a2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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='') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://blog.boochow.com/article/454179047.html