Control LewanSoul digital servos from the EZ-B UART or PC COM Serial Port
+ How To Add This Control To Your Project (Click to Expand)
- Make sure you have the latest version of ARC installed.
- Select the Get button in this page to download the archive file.
- Double click the downloaded archive file to execute installer.
- The installer will add this control to ARC.
- Load ARC and press the Project -> Add Control button from the menu.
- Choose the Servo category tab.
- Press the Lewansoul Servo icon to add the control to your project.
Control the LewanSoul Digital Servos (i.e. LX-16A) with ARC. The servos must be powered appropriately, and connected to the EZ-B v4 or IoTiny with the respective port. Visit the Config menu of this plugin to view the port configuration. This plugin will only operate on EZB Index #0.
Demonstrated with IoTiny using Software UART
This plugin requires a cable accessory to easily connect your servo to the EZ-B v4 or IoTiny. You can find the cable accessory in our store by clicking here
The Virtual Ports (V1..V99) in ARC can be assigned to the LewanSoul servos.
- This plugin requires the RX signal wire of the servo be connected to TX of the selected UART or digital port (if Software UART is selected) using the Dynamixel servo Cable.
- Hardware UART is available on the EZ-B v4 only, and is recommended if using an EZ-B v4 with Dynamixel servo Cable. View the EZ-B v4 datasheet to identify the UART ports (0, 1, or 2). Datasheet can be found here: http://www.ez-robot.com/Tutorials/Lesson/18
- Software UART is available on both the EZ-B v4 and IoTiny. We only recommend using software UART on IoTiny and hardware UART on EZ-B v4.
- The configuration menu also provides an option to select the Virtual Ports, which correspond with the ID's of the UBTech servos. If the LewanSoul servo ID #0 is connected, select V0. #1 = V1, #2 = V2, etc..
- Default baudrate of LewanSoul servos is 115,200
- Discussion on these servos is here: https://www.Synthiam.com/Community/Forum/Thread?threadId=10643
Specify servo Port By servo ID
The servos are addressable, meaning they each have an unique address ID. The address ID is related to the Vx servo (virtual servo) in ARC. Meaning, servo ID #1 is V1 in ARC. servo ID #5 is V5 in ARC. etc.. Specify the Vx ports to bind to using the configuration screen of this plugin. The example image below, the ID #1 (V1) is selected. This means any servo commands sent to V1 will move LewanSoul servo ID #1. You can select as many Vx ports to bind in this plugin as necessary.
Continuous Rotation (Motor) Mode
The servos can be configured for Continuous Rotation (i.e. Motor Mode) by using the EZ-Script ControlCommand()...
Code:ControlCommand("LewanSoul Servo", SetToContinuousMode, v1)
You can change the port (which is v1 in the above example) to what ever port you wish to be in continuous rotation mode. Once you do that, the servos will now respond as regular continuous rotation servos, where position 90 is stop, 180 is fast one direction and 1 is fast in the other direction. The values further from 90 in either direction are change the speed. This allows these servos to be used with the Continuous Rotation Movement Panel.
If you switched the servo into Continuous rotation mode, you can use the ControlCommand() to switch back to servo mode. This can be done with the following command...
Code:ControlCommand("LewanSoul Servo", SetToServoMode, v1)
Reading servo Positions
If the servo is connected to both the RX and TX of the selected hardware UART, the servo position can be read. This feature is available in both EZ-Script and Auto Position control. In EZ-Script, the GetServoRealtime() function will query the specified servo. Otherwise, in the Auto Position config screen, the servos can be queried using the Realtime query button in the frame editor.