Guest User

Untitled

a guest
Jul 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import serial, time
  2. import tkinter
  3. import os
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. def serialcmdw():
  13. os.system('clear')
  14. serialcmd = input("serial command: ")
  15. ser.write (serialcmd)
  16. serialcmdw()
  17.  
  18. ser = serial.Serial()
  19. os.system('clear')
  20. ser.port = "/dev/cu.usbmodem4321"
  21. ser.baudrate = 9600
  22. ser.open()
  23. time.sleep(1)
  24. serialcmdw()
  25.  
  26. ser.write(str.encode('allon'))
Add Comment
Please, Sign In to add comment