Scope control update

Interrupts on the mbed didn’t go so well - it’s easy enough to get them to run a function, but some timing issues arose and I gave up on that for now. Instead I’m relying on the fact that the Autostar continuously polls for data using the same sequence of bytes - 0x02 0x11 0x02 (which correspond to length 0x02, address 0x11 aka #506 cable and command number 0x02). So, whenever I need to speak to the Autostar I can regain sync by reading data from the Autostar until the last 24 bits read form the value 0x021102 - at which point I’m back in sync and ready to go :) It’s a bit of a hack, but it works and is good enough for me. Anyway, with that sorted I was in the position where I could type commands into a terminal to send to the mbed, which would then send them to the scope - but that gets a little tedious. So, this is what I’m using as of now:

ascontrol scope control GUI

It’s nice and simple to use, the direction buttons at the top left move the scope at the slew rate selected below. Information about the Autostar system is shown along the top. I’m not sure how much functionality I’m going to implement on the mbed itself, but I definitely don’t want it to sit there as a dumb translator between the PC & Autostar - that just seems wasteful, but it doesn’t hurt to have control from the PC in addition to whatever I do on the mbed.

I even came up with a crazy scheme which might solve the problems with my mounts tracking - stick my webcam in front of the scopes finder and implement something which would watch for movement and move to compensate and keep things in the same positions in the finder. But that would probably be pretty difficult to get working properly and not 100% exact anyway.

Still, I think it’s cool to be able to press a button on the PC and have the scope move around, especially considering how long it took me to get it to work :)

Code for the PC app is found here. It’s built with WebKit/Gtk+ and currently very basic. I’ll make the mbed code available at some point soon too.