Skip to content

Commit

Permalink
Merge pull request #5 from stschach/master
Browse files Browse the repository at this point in the history
macOS compatibility
  • Loading branch information
FlanFlanagan authored Mar 9, 2018
2 parents 84077e6 + 61c7655 commit 2c919a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions legoReactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ def initSerial():
print("...done. /dev/ttyACM" + str(i) + " :9600")
elif _platform == "windows" or _platform == "win32" or _platform == "win64":
ser = serial.Serial('COM' + str(i), 9600)
# Addition for macOS
elif _platform == "darwin":
ser = serial.Serial('/dev/cu.usbmodem14' + str(i+10), 9600)
time.sleep(3)
#ser.write("r" + str(5))
# print("Attempting to establish connection with arduino attempt number: " + str(i))
Expand Down

0 comments on commit 2c919a4

Please sign in to comment.