Skip to content

Instantly share code, notes, and snippets.

@nscooling
Created May 21, 2014 09:22
Show Gist options
  • Save nscooling/679b35f5246662c6b242 to your computer and use it in GitHub Desktop.
Save nscooling/679b35f5246662c6b242 to your computer and use it in GitHub Desktop.
Qucik and dirty python script to run Unity TDD on mbed
bin = 'build\\tdd.bin'
disk = 'F:\\'
copy(bin, disk)
sleep(1.5)
serial = Serial('COM8', timeout = 1)
serial.flushInput()
serial.flushOutput()
serial.sendBreak()
while True:
c = serial.readline()
sys.stdout.write(c)
sys.stdout.flush()
if c.find('OK') != -1:
break
if c.find('FAIL') != -1:
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment