In working through Python programming ShartpCap with my Atlas Pro AZ/EQ mount (which requires using EQMOD to work), I'm finding that the com port sometimes comes up with a different location. As far as I can tell, SharpCap cannot read out what ports are available. There is a plugin called pyserial that will allow for that level of functionality but requires PIP to make it work, which SharpCap's version of IronPython doesn't have.
So is there a way to make this work and how do I go about doing that?
The two programs-
https://pyserial.readthedocs.io/en/latest/pyserial.html
https://pip.pypa.io/en/stable/getting-started/
Finding com ports programmatically in SharpCap?
Forum rules
If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
- admin
- Site Admin
- Posts: 13360
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Finding com ports programmatically in SharpCap?
Hi,
the easiest thing when you encounter this sort of problem is to remember that IronPython is based on the Microsoft .NET framework, so C# code using the .NET framework can usually be translated fairly easily to IronPython. In this case.
Hope this helps,
Robin
the easiest thing when you encounter this sort of problem is to remember that IronPython is based on the Microsoft .NET framework, so C# code using the .NET framework can usually be translated fairly easily to IronPython. In this case.
Code: Select all
clr.AddReference("System.IO.Ports")
from System.IO.Ports import SerialPort
print (SerialPort.GetPortNames())
COM4 COM5 COM3
Robin
Re: Finding com ports programmatically in SharpCap?
Ah-ha!
I'm not a programmer, so stuff like .NET or C# is way beyond me.
As it is, I'm barely understanding Python.
Thanks, Robin.
I'm not a programmer, so stuff like .NET or C# is way beyond me.
As it is, I'm barely understanding Python.
Thanks, Robin.