fork download
  1. # coding: utf-8
  2. import serial
  3.  
  4. ser = serial.Serial(4, 9600, timeout=1)
  5. print ser.portstr
  6. c = "\0"
  7.  
  8. # MAIN LOOP
  9. while True:
  10. c = raw_input()
  11. ser.write(c)
  12. if(c == 'q'):
  13. break;
  14.  
  15. ser.close()
Runtime error #stdin #stdout 0.02s 4672KB
stdin
Standard input is empty
stdout
Standard output is empty