HDElectronics

Ibrahim to Bilel

Oct 27th, 2020
738
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import serial
  2. import time
  3.  
  4. s= serial.Serial(port='COM4')
  5. for i in range(10):
  6.     s.write(b'h')
  7.     time.sleep(0.5)
  8.     s.write(b'l')
  9.     time.sleep(0.5)
  10. s.close()
RAW Paste Data