![]() ![]() ![]() Considering that every tutorial on getting started I'd be willing to bet that anyone who knows what an Arduino is also knows enough to figure out which COM port it is using. I wonder if you aren't going through a lot of effort for nothing. MessageBox.Show("An error occurred while querying for WMI data: " & err.Message) MsgBox() 'Displays only one portįor Each queryObj As ManagementObject In searcher.Get() If I run the below code, I get COM1 & COM5:įor Each sp As String In My.ĭim connectionScope As New ManagementScope()ĭim serialQuery As New SelectQuery("SELECT * FROM Win32_SerialPort")ĭim searcher As New ManagementObjectSearcher(connectionScope, serialQuery) For some reason the code I found for this only displays ONE port even if there are TWO ports available. I am creating a script to auto-detect the arduino on the serial port. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |