Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor edit: only do reset sequence for leonardo when necessary

  • Loading branch information...
commit 0bc9b901c0726165fb7ac6ac97a4abbf294e29b4 1 parent 188ac54
@elcojacobs elcojacobs authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 programArduino.py
View
7 programArduino.py
@@ -57,9 +57,10 @@ def programArduino(boardType, hexFile, port, eraseEEPROM):
programCommand = programCommand + ' -e'
# open and close serial port at 1200 baud. This resets the Arduino Leonardo
- ser = serial.Serial(port, 1200)
- ser.close()
- sleep(1) # give the bootloader time to start up
+ if(boardType == 'leonardo'):
+ ser = serial.Serial(port, 1200)
+ ser.close()
+ sleep(1) # give the bootloader time to start up
p = sub.Popen(programCommand, stdout=sub.PIPE, stderr=sub.PIPE, shell=True)
output, errors = p.communicate()
Please sign in to comment.
Something went wrong with that request. Please try again.