Python scripts for motor control