Skip to content

Instantly share code, notes, and snippets.

@EspaceRaspberryFrancais
Last active March 14, 2019 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EspaceRaspberryFrancais/7f902fff1c4823504c1620755045c901 to your computer and use it in GitHub Desktop.
Save EspaceRaspberryFrancais/7f902fff1c4823504c1620755045c901 to your computer and use it in GitHub Desktop.
# Import de la librairie serial
import serial
# Ouverture du port serie avec :
# '/dev/ttyXXXX' : definition du port d ecoute (remplacer 'X' par le bon nom)
# 9600 : vitesse de communication
serialArduino = serial.Serial('/dev/ttyXXXX', 9600)
# Ecriture de chaque message recu
while True :
print(serialArduino.readline())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment