Dual axis programming

Hi

I would like to control the dual axis turntable. I am able to send commands to rotate the turntable.

I would like to be notified when the position is reached. For the moment, I have only a +OK; message just after sending the command. When the position is actually reached, I have no notification.

Is it possible ?

Hi
I don’t quite understand the problem. When the position is reached, the turntable simply stops, right? Why and what kind of notification do you still need?

best regards

The turntable is controlled by bluetooth. You send command like rotate by 90 degrees. You get a notification right away that the command is being processed. To rotate by 90 degrees you need to wait for several seconds. When the turntable has reached the desired position, it seems there is no notification.

Hi yes, you do not get any notification. What I did was to do launch +QT,CHANGEANGLE commands in pairs, and stop when both measurements were the same. Only then you can be sure that the turntable stopped.

Hi, thanks for answering me.

I thought something like this to check periodically if the current position is close to the requested one.

This is how I implemented. The idea is that it will get out of the function only when the turntable stopped.

def wait_for_end(c, command):
response_1=“first_measurement”
response_2=“second_measurement”
while response_1 != response_2:
send_command(c, command)
response_1=c.read()
send_command(c, command)
response_2=c.read()

Did you succeed to get the tilt position ? When I am using +QR,TILTANGLE, I get +DATA=-30.0,30.0,0.3; for any tilt position

+QR,TILTVALUE always returns 0.0

Never used it. As the time variance for tilt is way less than for rotation, I simply relayed on a sleep with a small timer