This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
import time | |
import pyautogui | |
ArduinoSerial = serial.Serial('com7',9600) #Create Serial port object called arduinoSerialData | |
time.sleep(2) #wait for 2 seconds for the communication to get established | |
while 1: | |
incoming = str (ArduinoSerial.readline()) #read the serial data and print it as line | |
print incoming | |