1- Programming visual interface with Qt5
2- Controlling Delta ASDA-A2 Servo Motor from Qt interface
3- Changing motor direction from QT interface
OS: Jetpack 4.5
CONTROL DELTA ASDA-A2 ZIP
In this blog, we are going to explain how to control Delta ASDA-A2 Servo Motor with NVIDIA Jetson Nano/Xavier NX using QT5. The complete setup has been explained in the previous Delta ASDA-A2 Servo Motor blogpost. In the previous Delta ASDA-A2 Servo Motor blog post, we have mentioned establishing a connection and getting a firmware version. In this post, we are going to be able to control the servo motor up and down direction by commanding from the Qt interface. You can find the source code at the end of this post.
Here the Qt interface we are facing, when we execute the code. We have to select the serial port from combobox.
After selecting the right serial port, we must connect to Servo Motor and we should see the firmware version of the servo device.
Our combobox slot can be seen below. We must set serial port properties and we have to connect signal and slot functions.
We need to write specific values to specific servo motor registers for moving servo motor. These registers and values can be found on Delta ASDA-A2 Servo Motor datasheet. You can check the "writeMotorRegister()" function below.
We have "RUN", "MOTOR UP", "MOTOR DOWN" and "MOTORPOSITION" buttons in our interface. The run button is for running the servo motor. The servo motor runs while we are pressing the "RUN" button. When we have released the "RUN" button, the servo motor stops. The pressed and released button slots can be seen below.
The "MOTORUP" and "MOTORDOWN" buttons slots are written like below. The buttons are used for changing the direction. The pressing these buttons just one time is enough for changing the direction.
The last button is "MOTORPOSITON" button, and it gives the specific motor point on its label. This label is not visible when motor is moving because of changing the exact position. You can get the exact motor position by pressing this button.
Here is the example of the interface visual.
Thank you for reading our blog post.