New post
0

basic encoder - requests too frequently

I'm writing Arduino and Bluetooth software to turn a very old (and very big) telescope into a Push-To, using two incremental encoders. I've used Stellarium to connect with it using Nexstar protocol (which always works quite well on Sky Safari 4+ too). However, there is also the simpler "basic encoder system" that I would like to try as it gives the others the option of upgrading the encoders in future without having to modify the firmware. However, the requests for position (using "Q") seem to come in much too quickly, even if I set the request rate to once per second. My debug output looks like this:
Bluetooth Initialized Successfully !BT [2]: OK
ؽ)®
BT: SPP active
Enc. query
> QQQQQQQQQQQQ
< +04512 -01297

Set time 05/216/-067/ - 00:18:33
> H
< #
BT: Disconnected
BT [2]: OK

A large number of Qs come in and I only have time to respond to the first. It looks like Sky Safari decides then that it hasn't had a response and closes the connection. Any ideas on what could be wrong?

For Nexstar, since the scope has no idea at all where it is pointing I was hoping to use the "align" function, but Sky Safari says its too far away whenever I select an object to align to, implying the scope should be reasonably accurate in the first place. I've cheated and used the "goto" function, and hijack the coordinates and set the encoder position to the goto coordinates instead, which seems to work. But I think the "Sync" command would be more appropriate for that.

1 comment

  • 0
    Avatar
    Bill Tschumy

    There is nothing wrong.  We send a string of QQQQQs to wake up the Box device.  This is what is recommended for the encoder BBox-type scopes.  It is not a request for position.  You can ignore them.

    Here is what our code comments say about it:

    // send 12 "Q" commands with an extra-long 5-second timeout, then

    // wait 1/2 sec.  This is the only command which seems to be understood

    // by all BBox encoder variants.  Some models don't seem to respond until

    // having recieved more than 10 'Q' commands in a row - hence we send 12.

    You will always get this with the Scope Type set to  "Basic Encoder System"

Please sign in to leave a comment.