Don't like ads? PRO users don't see any ads ;-)
Guest

Petr, Steve, QsB

By: a guest on Apr 25th, 2012  |  syntax: None  |  size: 0.45 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. s.write("W150\r\n")
  2.    
  3.     s.write("W0B1\r\n")
  4.    
  5.     s.write("W0C0\r\n")
  6.    
  7.     s.write("W0240\r\n")
  8.    
  9.     time.sleep(0.1)
  10.  
  11.     s.readline()
  12.    
  13.     s.write("S05\r\n")
  14.    
  15.     while True:
  16.         if (s.inWaiting() > 0):
  17.             break
  18.     response = s.readline()
  19.     print response
  20.  
  21.     while True:
  22.         if (s.inWaiting() > 0):
  23.             response = s.readline()
  24.             print response
  25.        
  26.     s.close()