Guest User

Problems - DE0 Nano Comms - vj-uart

a guest
Mar 8th, 2016
38
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import socket
  2.  
  3. host = 'localhost'
  4. port = 2323
  5.  
  6. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  7. s.connect((host,port))
  8. b = bin(8).split('0b')[1].zfill(7)
  9. s.send(b)
  10. print s.recv(1024)
  11.  
  12. s.close()
RAW Paste Data