Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. # Import de la librairie serial
  2. import serial
  3.  
  4. # Ouverture du port serie avec :
  5. # '/dev/ttyXXXX' : definition du port d ecoute (remplacer 'X' par le bon nom)
  6. # 9600 : vitesse de communication
  7. serialArduino = serial.Serial('/dev/ttyXXXX', 9600)
  8.  
  9.  
  10. # Ecriture de chaque message recu
  11. while True :
  12. print(serialArduino.readline())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement