I am after some advice. I have some genuine Arduino.CC boards using the 16U2 chips, and some clone boards which are using the CH340 chips.
I am writing some software in C# which lists all of the COM ports (and therefore arduino boards) connected to the computer, and I am using this code:
ManagementObjectSearcher managementObjectSearcher = new ManagementObjectSearcher(new ManagementScope(), (ObjectQuery)new SelectQuery("SELECT * FROM Win32_SerialPort"));
foreach (ManagementObject managementObject in managementObjectSearcher.Get())
{
string str1 = managementObject["Description"].ToString();
string str2 = managementObject["DeviceID"].ToString();
Console.WriteLine(str1 + " " + str2);
}
Sadly, this does not work with the CH340 based boards. Can somebody tell me if there are any other clone boards which would work with this (basically any board not using the CH340 chips).
Changing the code in the software is not an option sadly since this particular piece of code is used in older versions of the software. I have however, fixed this issue in the new versions of the software to work witht CH340 boards.
Thank you