Skip to content

Instantly share code, notes, and snippets.

@twatteyne
Created September 5, 2014 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twatteyne/7bb4a4a7b0d2ebb58385 to your computer and use it in GitHub Desktop.
Save twatteyne/7bb4a4a7b0d2ebb58385 to your computer and use it in GitHub Desktop.
use OpenWSN's findSerialPort
'''
drop this file in a new directory:
openwsn-sw\software\openvisualizer\bin\testFindSerialPort\
double-click to run.
example output:
[('COM6', 115200)]
Script ended successfully. Press Enter to close.
'''
#============================ adjust path =====================================
import os
import sys
if __name__=='__main__':
here = sys.path[0]
sys.path.insert(0, os.path.join(here,'..','..'))
#============================ import ==========================================
from openvisualizer.moteProbe.moteProbe import findSerialPorts
#============================ main ============================================
def main():
print findSerialPorts()
raw_input("Script ended successfully. Press Enter to close.")
if __name__=='__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment