Created
September 5, 2014 02:26
-
-
Save twatteyne/7bb4a4a7b0d2ebb58385 to your computer and use it in GitHub Desktop.
use OpenWSN's findSerialPort
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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