Choosing a Star Tracker Controller Solution

Star Tracker Controller Solution Choices
Star Tracker Controller Solution Choices

Well, we appear to be back to endless days of terribly cloudy weather. It just goes to show that you have to take advantage of every clear sky night that you have. So in the meantime, I’ve been busy working on three things. First, I’ve started tinkering with the next version of the 3D-printed star tracker. Second, I’m exploring how to create a focuser for the Samyang lens. And finally, I’m messing around with a Bluetooth Low Energy (BLE) controller for the star tracker and the focuser. It’s been slow going on all fronts, but I wanted to provide a quick update on what’s been going on. Spoiler alert – this is likely the most boring post I’ve written on astrophotography to date. You’ve been warned.

Choosing a Development Platform

So controlling an Arduino chip via BLE sounds pretty straightforward and easy, right? That’s what I thought as well. Actually, BLE isn’t all that tricky to figure out as its structure is pretty straightforward. However, I’ve been thoroughly stymied on the development interface part of the project. Right out of the gate, there are no shortages of options. Windows and Linux are both appealing as desktop options. On the other hand, maybe an Android or iOS solution would be nifty.

Since I’m going to be using my laptop to control the imaging anyway, I thought a desktop option would be best. If I stick with what I know best, I’d probably want to code for Linux. But then I might have to fire up a second laptop every time I want to image with the tracker. Umm, no. I’m not going to go that full-on crazy right now. Ok, that narrows it down to Windows. Well, it’s been a while since I’ve written in C-ish code but I’ve never shied away from a challenge. Seems plausible.

On the mobile front, I’ve had some experience with React Native so this is tempting. Problem is that it’s been even longer since I’ve written code in this space. Besides, I wasn’t all that great at it when I initially learned it when I was bored a few years back. But it’s something to consider nonetheless. It sure would be nice to control the tracker via my phone.

But starting out, I choose to go the Windows route. I probably should have known better…

I’ll Never Learn

I’ve steered well clear of Windows development for many good reasons over the years. I’m not knocking Windows development. Just I’m more of a hack when it comes to software development. I’ve got well over a decade of full-time development experience on Perl and about half that on C+. But I’m an electrical engineer, not a software developer. And I’ve learned enough over the years to know that Windows development can be tricky to do well. But what the heck, let’s give C# a whirl.

Imagine my delight when after about 2 hours of coding, I had a working Windows console app designed that had me communicating with the Arduino over BLE to read and write the BLE characteristics. Maybe I’ve underestimated my awesomeness! Do you hear that sound in the background? Yeah, that’s Windows laughing because I’ve fallen into its trap.

I was never interested in using a console app as a star tracker controller. I want to use a Windows Forms (WF) app to control the star tracker. So I started putting my form together and it was looking pretty sweet. The problem was, that I couldn’t get it to work. Getting async to work with the form was driving me looney. After about 8 hours of fruitless labor, I decided to go in a different direction. Let’s try a Universal Windows Platform (UWP) solution. Another 8 hours flushed down the toilet. Besides, looks like UWP is going to be replaced with Windows UI Library (WinUI 3). And that worked out equally as horribly.

Stuff this! I’ve got a working Windows console app that can control the Arduino, but it’s not worth my time to pursue a Windows UI solution any longer. Let’s go mobile!

React Native to the Rescue

I’m totally pumped to start working in mobile development again for these projects. I can do this! So I set up my React Native (RN) development environment. After about an hour I felt like I was back in the saddle of being productive with RN.

But enough time has passed since I’ve worked with React Native and there are clearly a number of changes that are going to slow me down a bit. The good news is that I have some code working that can at least communicate with the Arduino chip. The bad news is that I’m going to have to back up a step and reeducate myself a bit before I’m going to be able to write the program that I want to.

So, over the next couple of weeks, I plan on working through a React Native online course to get back on top of my game.

So That’s That

Yeah, I know, a whole lot of nothing in this post. But this is where I am at the moment. Just trying to keep busy while waiting for clearer skies. Hopefully, I’ll be able to get out and test the star tracker with the Samyang lens soon!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.