Python scripts

The scripts folder of the Python examples includes a few command-line Python programs used by several tutorials.

mini_maestro_dfmoco.py

This script can control hobby servos from Dragonframe using a Mini-Maestro Servo Interface board. It communicates with Dragonframe using a TCP network socket and the DFMoco protocol, passing along motion commands to a Mini Maestro connected via USB as a serial port.

This implementation makes no attempt to control speed or acceleration or read back the actual status; it simply passes the position targets along, mapping ‘stepper pulses’ to the finest pulse resolution intervals (250 ns). It does not support re-zeroing, positions are always absolute.

A typical command line (e.g. Terminal.app) for running the program looks as follows:

python2.7 mini_mini_dfmoco.py --maestro /dev/tty.usbmodem00146911 --servos 3 --verbose

That will start a server that waits for a connection from Dragonframe. For more details, please see Mini Maestro Servo Motion Control Setup.

simulate_dfmoco_device.py

This script simulates a motion control device for Dragonframe. It communicates with Dragonframe using a TCP network socket and the DFMoco protocol. This is primarily useful for testing or learning to use Dragonframe ARC Motion.