import serial
import pyautogui
import time


# pyautogui.moveTo(700, 700, duration=1)
#Left port
# ser = serial.Serial('/dev/tty.usbmodem14101')

#Right port
# ser    = serial.Serial('/dev/tty.usbmodem14201')

# Arduino_Serial = serial.Serial('/dev/tty.usbmodem14201',9600)    

# old_data = str (Arduino_Serial.readline())

# while True:
    # new_data = str (Arduino_Serial.readline())
    # new_data_number = [int(s) for s in new_data.split() if s.isdigit()]
    # if new_data > old_data:
    #     print('You moved away')
    # elif new_data < old_data:
    #     print('You moved closer')
    
    # old_data = new_data
    # print(new_data)






# ser    = serial.Serial('/dev/tty.usbmodem14201', 9600, timeout=0,
# parity = serial.PARITY_EVEN, rtscts=1)
# s      = ser.read(100) 
# print(s)
# print(s)
# print(s)


# line = ser.readline()

# print(line)
# print(line)
# print(line)


# print(pyautogui.position())

# while True:
#     print(Arduino_Serial)
#     time.sleep(1)

