Wednesday, April 14, 2021

read data from the mount

At last, I successfully coded a simple interface to read data from the GoToStar mount!

working VB code in Visual Studio

Look at that! After opening the (hard coded) port, I read some data from the mount, namely its date, time, time zone offset from GMT, and the latitude and longitude. And, finally, the side of the pier I was on. I was pointed at Alphard, at the time.

Woo hoo!

This has been a bit of a journey to this point... Sadly, because of incomplete resources and people that are making assumptions.

A couple of months ago I downloaded Visual Studio 2019 Community. Had a quick look 

When I went back in a week ago, it wouldn't let me proceed. At first I thought it was a trial and it had ended and that was it. But I was certain a variant of VS was free. And after some digging I confirmed it was. But Microsoft wanted some credentials. Fine.

Then I started following one tutorial on serial communications but I could not seem to reference any computer or system IO features.

Was it not possible in the free Community studio product?

I looked again at the ASCOM Telescope class and form code LXP source. Didn't make sense.

And oddly I did not find clarity in the Microsoft online docs.

Finally, a fresh Google search lead me to a post on MSDN. Leo Liu explained it. He said a Class Library using the .NET Framework was needed. 

I tried that and only got so far. Some progress. But I didn't know how to get the form to work with the class object.

But another look revealed it! A Windows Form based on .NET Framework. Filtering helped! It had been there the whole time but there are so many options presented I had missed it. And all the videos I had watched had not stated that requirement!

Didn't need a Class. Not yet, anyway.

I was in business finally.

Then I watched MISperry's video on YouTube again, a joy in simplicity.

Opened the port. He showed how to write to the port. Then I read the port. And was thrilled to find the smart ReadTo method. Yes!

...

I knew it! I knew it didn't need to be so complicated! And I knew my VBA experience would be helpful. The IDE in VS sure it convoluted though, sheesh.

No comments: